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>attributesprotected List<ObjectModelDependency>dependenciesprotected booleanexternprotected booleaninnerprotected List<ObjectModelInterface>interfacesprotected List<ObjectModelImplRef>interfacesRefsprotected List<ObjectModelOperation>operationsprotected List<ObjectModelAttribute>orderedAttributesprotected StringpackageNameprotected StringqualifiedNameprotected Stringtype-
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 voidaddAttribute(ObjectModelAttributeImpl attribute)voidaddDependency(ObjectModelDependencyImpl dependency)voidaddInterface(ObjectModelImplRef ref)voidaddOperation(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.ObjectModelAttributegetAttribute(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 classifierObjectModelDependencygetDependency(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.StringgetPackageName()Returns the package name of this classifier.StringgetQualifiedName()Returns the qualified name of this classifier.booleanisClass()Returns whether this classifier is a class or notbooleanisEnum()Returns whether this classifier is an enumeration or notbooleanisExtern()booleanisInner()Returns whether this class is inner an other class or not.booleanisInterface()Returns whether this classifier is an interface or notvoidpostInit()voidsetExtern(boolean extern)voidsetInner(boolean inner)voidsetPackage(String packageName)voidsetType(String type)StringtoString()-
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:
postInitin 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:ObjectModelClassifierReturns whether this class is inner an other class or not.- Specified by:
isInnerin 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:ObjectModelClassifierReturns the package name of this classifier.- Specified by:
getPackageNamein interfaceObjectModelClassifier- Returns:
- the package name of this classifier.
-
getQualifiedName
public String getQualifiedName()
Description copied from interface:ObjectModelClassifierReturns the qualified name of this classifier. Class qualified name is composed of the package name and the classifier name.- Specified by:
getQualifiedNamein interfaceObjectModelClassifier- Returns:
- the qualified name of this classifier.
-
getInterfaces
public Collection<ObjectModelInterface> getInterfaces()
Description copied from interface:ObjectModelClassifierReturns all parent interfaces for this classifier.- Specified by:
getInterfacesin interfaceObjectModelClassifier- Returns:
- a Collection containing all parent ObjectModelInterface for this classifier.
-
getOperations
public Collection<ObjectModelOperation> getOperations(String name)
Description copied from interface:ObjectModelClassifierReturns all operations defined on this classifier.- Specified by:
getOperationsin 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:ObjectModelClassifierReturns all operations defined on this classifier.- Specified by:
getOperationsin interfaceObjectModelClassifier- Returns:
- a Collection containing all ObjectModelOperation for this classifier.
- See Also:
ObjectModelOperation
-
getAllOtherOperations
public Collection<ObjectModelOperation> getAllOtherOperations(boolean distinct)
Description copied from interface:ObjectModelClassifierReturns 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:
getAllOtherOperationsin 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:ObjectModelClassifierReturns all operations defined on all interfaces implemented by this classifier, directly or indirectly.- Specified by:
getAllInterfaceOperationsin 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:ObjectModelClassifierReturns all attributes defined on this class.- Specified by:
getAttributesin 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:
getAttributein 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:ObjectModelClassifierReturns all attributes defined on all interfaces implemented by this classifier, directly or indirectly.- Specified by:
getAllInterfaceAttributesin interfaceObjectModelClassifier- Returns:
- a Collection of ObjectModelAttribute
-
getAllOtherAttributes
public Collection<ObjectModelAttribute> getAllOtherAttributes()
Description copied from interface:ObjectModelClassifierReturns all attributes defined on all super class extended by this classifier, directly or indirectly.- Specified by:
getAllOtherAttributesin interfaceObjectModelClassifier- Returns:
- a Collection of ObjectModelAttribute
-
getAllInterfaceAttributes
protected Collection<ObjectModelAttribute> getAllInterfaceAttributes(Collection<ObjectModelAttribute> result)
-
getDependencies
public Collection<ObjectModelDependency> getDependencies()
Description copied from interface:ObjectModelClassifierReturns all dependencies of this client classifier- Specified by:
getDependenciesin interfaceObjectModelClassifier- Returns:
- a Collection of ObjectModelDependency
-
getDependency
public ObjectModelDependency getDependency(String name)
Description copied from interface:ObjectModelClassifierReturn a dependency identifier by her name- Specified by:
getDependencyin interfaceObjectModelClassifier- Parameters:
name- of the dependency- Returns:
- the dependency
-
isClass
public final boolean isClass()
Description copied from interface:ObjectModelClassifierReturns whether this classifier is a class or not- Specified by:
isClassin 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:ObjectModelClassifierReturns whether this classifier is an interface or not- Specified by:
isInterfacein 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:ObjectModelClassifierReturns whether this classifier is an enumeration or not- Specified by:
isEnumin interfaceObjectModelClassifier- Returns:
- a boolean indicating whether this classifier is an enumeration or not.
- See Also:
ObjectModelEnumeration
-
-