Class ObjectModelClassImpl
- java.lang.Object
-
- org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
-
- org.nuiton.eugene.models.object.xml.ObjectModelClassifierImpl
-
- org.nuiton.eugene.models.object.xml.ObjectModelClassImpl
-
- All Implemented Interfaces:
WithTagValuesOrStereotypes
,ObjectModelClass
,ObjectModelClassifier
,ObjectModelElement
- Direct Known Subclasses:
ObjectModelAssociationClassImpl
public class ObjectModelClassImpl extends ObjectModelClassifierImpl implements ObjectModelClass
ObjectModelClassImpl. Created: 14 janv. 2004- Author:
- Cédric Pineau - pineau@codelutin.com, Florian Desbois - desbois@codelutin.com
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ObjectModelClassifier>
innerClasses
protected List<ObjectModelClass>
specialisations
protected List<ObjectModelClass>
superclasses
protected Map<ObjectModelClass,String>
superclassesDiscriminators
protected List<ObjectModelImplRef>
superclassesRefs
-
Fields inherited from class org.nuiton.eugene.models.object.xml.ObjectModelClassifierImpl
attributes, dependencies, extern, inner, interfaces, interfacesRefs, operations, orderedAttributes, packageName, qualifiedName, type
-
Fields inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
comments, declaringElement, documentation, modifiers, name, objectModelImpl, tagValues
-
-
Constructor Summary
Constructors Constructor Description ObjectModelClassImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInnerClassifier(ObjectModelClassifierImpl innerClass)
Digester method to add innerClass to this ObjectModelClass.void
addSuperclass(ObjectModelImplRef ref)
void
clearSuperclasses()
Collection<ObjectModelAttribute>
getAllOtherAttributes()
Returns all attributes defined on all super class extended by this classifier, directly or indirectly.protected Collection<ObjectModelAttribute>
getAllOtherAttributes(Collection<ObjectModelAttribute> result)
Collection<ObjectModelOperation>
getAllOtherOperations(boolean distinct)
Returns all operations defined on all implemented by this classifier, directly or indirectly.Collection<ObjectModelOperation>
getAllSuperclassOperations(boolean distinct)
Returns all operations defined on all Super class extended by this classifier, directly or indirectly. and all interface implemented by the super class.protected Collection<ObjectModelOperation>
getAllSuperclassOperations(Collection<ObjectModelOperation> result)
protected Set<ObjectModelModifier>
getAuthorizedModifiers()
String
getDiscriminator(ObjectModelClass superclass)
Returns the discriminator for the given superclass.Collection<ObjectModelClassifier>
getInnerClassifiers()
Returns all inner classes for this class.Collection<ObjectModelClass>
getSpecialisations()
Returns all known direct specialized classes for this class.Collection<ObjectModelClass>
getSpecialisations(String discriminator)
Returns all known specialized classes for this class for the specified discriminator.Collection<ObjectModelClass>
getSuperclasses()
Returns all parent classes for this class.boolean
isAbstract()
Returns whether this class is abstract or not.void
setAbstract(boolean abstractz)
String
toString()
-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelClassifierImpl
addAttribute, addDependency, addInterface, addOperation, getAllInterfaceAttributes, getAllInterfaceAttributes, getAllInterfaceOperations, getAllInterfaceOperations, getAttribute, getAttributes, getDependencies, getDependency, getInterfaces, getOperations, getOperations, getPackageName, getQualifiedName, isClass, isEnum, isExtern, isInner, isInterface, postInit, setExtern, setInner, setPackage, setType
-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
addComment, addModifier, addOrRemoveModifier, addStereotype, addStereotype, addTagValue, addTagValue, 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.ObjectModelClassifier
getAllInterfaceAttributes, getAllInterfaceOperations, getAttribute, getAttributes, getDependencies, getDependency, getInterfaces, getOperations, getOperations, getPackageName, getQualifiedName, isClass, isEnum, isInner, isInterface
-
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
-
superclasses
protected List<ObjectModelClass> superclasses
-
superclassesDiscriminators
protected Map<ObjectModelClass,String> superclassesDiscriminators
-
superclassesRefs
protected List<ObjectModelImplRef> superclassesRefs
-
specialisations
protected List<ObjectModelClass> specialisations
-
innerClasses
protected List<ObjectModelClassifier> innerClasses
-
-
Method Detail
-
getAuthorizedModifiers
protected Set<ObjectModelModifier> getAuthorizedModifiers()
- Specified by:
getAuthorizedModifiers
in classObjectModelElementImpl
-
clearSuperclasses
public void clearSuperclasses()
-
addSuperclass
public void addSuperclass(ObjectModelImplRef ref)
-
addInnerClassifier
public void addInnerClassifier(ObjectModelClassifierImpl innerClass)
Digester method to add innerClass to this ObjectModelClass.- Parameters:
innerClass
- the ObjectModelClass to add
-
setAbstract
public void setAbstract(boolean abstractz)
-
getSuperclasses
public Collection<ObjectModelClass> getSuperclasses()
Description copied from interface:ObjectModelClass
Returns all parent classes for this class.- Specified by:
getSuperclasses
in interfaceObjectModelClass
- Returns:
- a Collection containing all parent ObjectModelClass for this class.
-
getInnerClassifiers
public Collection<ObjectModelClassifier> getInnerClassifiers()
Description copied from interface:ObjectModelClass
Returns all inner classes for this class.- Specified by:
getInnerClassifiers
in interfaceObjectModelClass
- Returns:
- a Collection containing all inner ObjectModelClass for this class.
-
getDiscriminator
public String getDiscriminator(ObjectModelClass superclass)
Returns the discriminator for the given superclass.- Specified by:
getDiscriminator
in interfaceObjectModelClass
- Parameters:
superclass
- super class to get discriminator- Returns:
- the discriminator for the given superclass as a String if it exists, null otherwise.
-
getSpecialisations
public Collection<ObjectModelClass> getSpecialisations()
Returns all known direct specialized classes for this class.- Specified by:
getSpecialisations
in interfaceObjectModelClass
- Returns:
- a Collection containing all known direct specialized ObjectModelClass for this class.
- See Also:
ObjectModelClass
-
getSpecialisations
public Collection<ObjectModelClass> getSpecialisations(String discriminator)
Returns all known specialized classes for this class for the specified discriminator.- Specified by:
getSpecialisations
in interfaceObjectModelClass
- Parameters:
discriminator
- discriminator to get specialisations- Returns:
- a Collection containing all known specialized ObjectModelClass for this class for the specified discriminator.
- See Also:
ObjectModelClass
-
isAbstract
public boolean isAbstract()
Returns whether this class is abstract or not.- Specified by:
isAbstract
in interfaceObjectModelClass
- Returns:
- a boolean indicating whether this class is abstract or not.
-
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
- Overrides:
getAllOtherOperations
in classObjectModelClassifierImpl
- Parameters:
distinct
- if this boolean is true only distinct operation are add to list.- Returns:
- a Collection of ObjectModelOperation
-
getAllSuperclassOperations
public Collection<ObjectModelOperation> getAllSuperclassOperations(boolean distinct)
Description copied from interface:ObjectModelClass
Returns all operations defined on all Super class extended by this classifier, directly or indirectly. and all interface implemented by the super class.- Specified by:
getAllSuperclassOperations
in interfaceObjectModelClass
- Parameters:
distinct
- if this boolean is true only distinct operation are add to list.- Returns:
- a Collection of ObjectModelOperation
-
getAllSuperclassOperations
protected Collection<ObjectModelOperation> getAllSuperclassOperations(Collection<ObjectModelOperation> result)
-
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
- Overrides:
getAllOtherAttributes
in classObjectModelClassifierImpl
- Returns:
- a Collection of ObjectModelAttribute
-
getAllOtherAttributes
protected Collection<ObjectModelAttribute> getAllOtherAttributes(Collection<ObjectModelAttribute> result)
-
toString
public String toString()
- Overrides:
toString
in classObjectModelClassifierImpl
-
-