Class ObjectModelClassifierImpl
- java.lang.Object
-
- org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
-
- org.nuiton.eugene.models.object.xml.ObjectModelClassifierImpl
-
- All Implemented Interfaces:
WithTagValuesOrStereotypes
,ObjectModelClassifier
,ObjectModelElement
- Direct Known Subclasses:
ObjectModelClassImpl
,ObjectModelEnumerationImpl
,ObjectModelInterfaceImpl
public abstract class ObjectModelClassifierImpl extends ObjectModelElementImpl implements ObjectModelClassifier
ObjectModelClassifierImpl.- Author:
- chatellier, cedric
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,ObjectModelAttribute>
attributes
protected List<ObjectModelDependency>
dependencies
protected boolean
extern
protected boolean
inner
protected List<ObjectModelInterface>
interfaces
protected List<ObjectModelImplRef>
interfacesRefs
protected List<ObjectModelOperation>
operations
protected List<ObjectModelAttribute>
orderedAttributes
protected String
packageName
protected String
qualifiedName
protected String
type
-
Fields inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
comments, declaringElement, documentation, modifiers, name, objectModelImpl, tagValues
-
-
Constructor Summary
Constructors Constructor Description ObjectModelClassifierImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(ObjectModelAttributeImpl attribute)
void
addDependency(ObjectModelDependencyImpl dependency)
void
addInterface(ObjectModelImplRef ref)
void
addOperation(ObjectModelOperationImpl operation)
Collection<ObjectModelAttribute>
getAllInterfaceAttributes()
Returns all attributes defined on all interfaces implemented by this classifier, directly or indirectly.protected Collection<ObjectModelAttribute>
getAllInterfaceAttributes(Collection<ObjectModelAttribute> result)
Collection<ObjectModelOperation>
getAllInterfaceOperations(boolean distinct)
Returns all operations defined on all interfaces implemented by this classifier, directly or indirectly.protected Collection<ObjectModelOperation>
getAllInterfaceOperations(Collection<ObjectModelOperation> result)
Collection<ObjectModelAttribute>
getAllOtherAttributes()
Returns all attributes defined on all super class extended by this classifier, directly or indirectly.Collection<ObjectModelOperation>
getAllOtherOperations(boolean distinct)
Returns all operations defined on all implemented by this classifier, directly or indirectly.ObjectModelAttribute
getAttribute(String attributeName)
Returns the attribute corresponding to the given name, or null if the class contains no attribute for this name.Collection<ObjectModelAttribute>
getAttributes()
Returns all attributes defined on this class.Collection<ObjectModelDependency>
getDependencies()
Returns all dependencies of this client classifierObjectModelDependency
getDependency(String name)
Return a dependency identifier by her nameCollection<ObjectModelInterface>
getInterfaces()
Returns all parent interfaces for this classifier.Collection<ObjectModelOperation>
getOperations()
Returns all operations defined on this classifier.Collection<ObjectModelOperation>
getOperations(String name)
Returns all operations defined on this classifier.String
getPackageName()
Returns the package name of this classifier.String
getQualifiedName()
Returns the qualified name of this classifier.boolean
isClass()
Returns whether this classifier is a class or notboolean
isEnum()
Returns whether this classifier is an enumeration or notboolean
isExtern()
boolean
isInner()
Returns whether this class is inner an other class or not.boolean
isInterface()
Returns whether this classifier is an interface or notvoid
postInit()
void
setExtern(boolean extern)
void
setInner(boolean inner)
void
setPackage(String packageName)
void
setType(String type)
String
toString()
-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
addComment, addModifier, addOrRemoveModifier, addStereotype, addStereotype, addTagValue, addTagValue, getAuthorizedModifiers, getComments, getDeclaringElement, getDescription, getDocumentation, getModel, getName, getSourceDocumentation, getStereotypes, getTagValue, getTagValues, hasStereotype, hasTagValue, isStatic, removeModifier, removeModifiers, removeStereotype, removeTagValue, setDeclaringElement, setDocumentation, setName, setObjectModelImpl, setStatic
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuiton.eugene.models.object.ObjectModelElement
getComments, getDeclaringElement, getDescription, getDocumentation, getName, getSourceDocumentation, isStatic
-
Methods inherited from interface org.nuiton.eugene.models.extension.tagvalue.WithTagValuesOrStereotypes
addStereotype, addTagValue, getStereotypes, getTagValue, getTagValues, hasStereotype, hasTagValue, removeStereotype, removeTagValue
-
-
-
-
Field Detail
-
extern
protected boolean extern
-
qualifiedName
protected String qualifiedName
-
packageName
protected String packageName
-
interfaces
protected List<ObjectModelInterface> interfaces
-
interfacesRefs
protected List<ObjectModelImplRef> interfacesRefs
-
operations
protected List<ObjectModelOperation> operations
-
attributes
protected Map<String,ObjectModelAttribute> attributes
-
orderedAttributes
protected List<ObjectModelAttribute> orderedAttributes
-
dependencies
protected List<ObjectModelDependency> dependencies
-
type
protected String type
-
inner
protected boolean inner
-
-
Method Detail
-
postInit
public void postInit()
- Overrides:
postInit
in classObjectModelElementImpl
-
setExtern
public void setExtern(boolean extern)
-
setPackage
public void setPackage(String packageName)
-
setInner
public void setInner(boolean inner)
-
isInner
public boolean isInner()
Description copied from interface:ObjectModelClassifier
Returns whether this class is inner an other class or not.- Specified by:
isInner
in interfaceObjectModelClassifier
- Returns:
- a boolean indicating whether this class is inner an other class or not.
-
addInterface
public void addInterface(ObjectModelImplRef ref)
-
addOperation
public void addOperation(ObjectModelOperationImpl operation)
-
addAttribute
public void addAttribute(ObjectModelAttributeImpl attribute)
-
addDependency
public void addDependency(ObjectModelDependencyImpl dependency)
-
setType
public void setType(String type)
-
isExtern
public boolean isExtern()
-
getPackageName
public String getPackageName()
Description copied from interface:ObjectModelClassifier
Returns the package name of this classifier.- Specified by:
getPackageName
in interfaceObjectModelClassifier
- Returns:
- the package name of this classifier.
-
getQualifiedName
public String getQualifiedName()
Description copied from interface:ObjectModelClassifier
Returns the qualified name of this classifier. Class qualified name is composed of the package name and the classifier name.- Specified by:
getQualifiedName
in interfaceObjectModelClassifier
- Returns:
- the qualified name of this classifier.
-
getInterfaces
public Collection<ObjectModelInterface> getInterfaces()
Description copied from interface:ObjectModelClassifier
Returns all parent interfaces for this classifier.- Specified by:
getInterfaces
in interfaceObjectModelClassifier
- Returns:
- a Collection containing all parent ObjectModelInterface for this classifier.
-
getOperations
public Collection<ObjectModelOperation> getOperations(String name)
Description copied from interface:ObjectModelClassifier
Returns all operations defined on this classifier.- Specified by:
getOperations
in interfaceObjectModelClassifier
- Parameters:
name
- name of operation should be returned- Returns:
- a Collection containing all ObjectModelOperation for this classifier.
- See Also:
ObjectModelOperation
-
getOperations
public Collection<ObjectModelOperation> getOperations()
Description copied from interface:ObjectModelClassifier
Returns all operations defined on this classifier.- Specified by:
getOperations
in interfaceObjectModelClassifier
- Returns:
- a Collection containing all ObjectModelOperation for this classifier.
- See Also:
ObjectModelOperation
-
getAllOtherOperations
public Collection<ObjectModelOperation> getAllOtherOperations(boolean distinct)
Description copied from interface:ObjectModelClassifier
Returns all operations defined on all implemented by this classifier, directly or indirectly. For interface this methode return the same result as getAllInterfaceOperations, for Class this method add all operation of SuperClass.- Specified by:
getAllOtherOperations
in interfaceObjectModelClassifier
- Parameters:
distinct
- if this boolean is true only distinct operation are add to list.- Returns:
- a Collection of ObjectModelOperation
-
getAllInterfaceOperations
public Collection<ObjectModelOperation> getAllInterfaceOperations(boolean distinct)
Description copied from interface:ObjectModelClassifier
Returns all operations defined on all interfaces implemented by this classifier, directly or indirectly.- Specified by:
getAllInterfaceOperations
in interfaceObjectModelClassifier
- Parameters:
distinct
- if this boolean is true only distinct operation are add to list.- Returns:
- a Collection of ObjectModelOperation
-
getAllInterfaceOperations
protected Collection<ObjectModelOperation> getAllInterfaceOperations(Collection<ObjectModelOperation> result)
-
getAttributes
public Collection<ObjectModelAttribute> getAttributes()
Description copied from interface:ObjectModelClassifier
Returns all attributes defined on this class.- Specified by:
getAttributes
in interfaceObjectModelClassifier
- Returns:
- a Collection containing all ObjectModelAttribute for this class.
- See Also:
ObjectModelAttribute
-
getAttribute
public ObjectModelAttribute getAttribute(String attributeName)
Returns the attribute corresponding to the given name, or null if the class contains no attribute for this name.- Specified by:
getAttribute
in interfaceObjectModelClassifier
- Parameters:
attributeName
- attribute name- Returns:
- the ObjectModelAttribute of the found attribute, or null if the class contains no attribute for this name.
-
getAllInterfaceAttributes
public Collection<ObjectModelAttribute> getAllInterfaceAttributes()
Description copied from interface:ObjectModelClassifier
Returns all attributes defined on all interfaces implemented by this classifier, directly or indirectly.- Specified by:
getAllInterfaceAttributes
in interfaceObjectModelClassifier
- Returns:
- a Collection of ObjectModelAttribute
-
getAllOtherAttributes
public Collection<ObjectModelAttribute> getAllOtherAttributes()
Description copied from interface:ObjectModelClassifier
Returns all attributes defined on all super class extended by this classifier, directly or indirectly.- Specified by:
getAllOtherAttributes
in interfaceObjectModelClassifier
- Returns:
- a Collection of ObjectModelAttribute
-
getAllInterfaceAttributes
protected Collection<ObjectModelAttribute> getAllInterfaceAttributes(Collection<ObjectModelAttribute> result)
-
getDependencies
public Collection<ObjectModelDependency> getDependencies()
Description copied from interface:ObjectModelClassifier
Returns all dependencies of this client classifier- Specified by:
getDependencies
in interfaceObjectModelClassifier
- Returns:
- a Collection of ObjectModelDependency
-
getDependency
public ObjectModelDependency getDependency(String name)
Description copied from interface:ObjectModelClassifier
Return a dependency identifier by her name- Specified by:
getDependency
in interfaceObjectModelClassifier
- Parameters:
name
- of the dependency- Returns:
- the dependency
-
isClass
public final boolean isClass()
Description copied from interface:ObjectModelClassifier
Returns whether this classifier is a class or not- Specified by:
isClass
in interfaceObjectModelClassifier
- Returns:
- a boolean indicating whether this classifier is a class or not.
- See Also:
ObjectModelClass
-
isInterface
public final boolean isInterface()
Description copied from interface:ObjectModelClassifier
Returns whether this classifier is an interface or not- Specified by:
isInterface
in interfaceObjectModelClassifier
- Returns:
- a boolean indicating whether this classifier is an interface or not.
- See Also:
ObjectModelInterface
-
isEnum
public final boolean isEnum()
Description copied from interface:ObjectModelClassifier
Returns whether this classifier is an enumeration or not- Specified by:
isEnum
in interfaceObjectModelClassifier
- Returns:
- a boolean indicating whether this classifier is an enumeration or not.
- See Also:
ObjectModelEnumeration
-
-