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>innerClassesprotected List<ObjectModelClass>specialisationsprotected List<ObjectModelClass>superclassesprotected Map<ObjectModelClass,String>superclassesDiscriminatorsprotected List<ObjectModelImplRef>superclassesRefs-
Fields inherited from class org.nuiton.eugene.models.object.xml.ObjectModelClassifierImpl
attributes, dependencies, extern, inner, interfaces, interfacesRefs, operations, 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 voidaddInnerClassifier(ObjectModelClassifierImpl innerClass)Digester method to add innerClass to this ObjectModelClass.voidaddSuperclass(ObjectModelImplRef ref)voidclearSuperclasses()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()StringgetDiscriminator(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.booleanisAbstract()Returns whether this class is abstract or not.protected voidmergeFrom(ObjectModelClassImpl source)This method takes two ObjectModelClassImpl and merges both of them in the first onevoidsetAbstract(boolean abstractz)StringtoString()-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelClassifierImpl
addAttribute, addDependency, addInterface, addOperation, contains, contains, contains, getAllInterfaceAttributes, getAllInterfaceAttributes, getAllInterfaceOperations, getAllInterfaceOperations, getAttribute, getAttributes, getDependencies, getDependency, getInterfaces, getOperations, getOperations, getPackageName, getQualifiedName, isClass, isEnum, isExtern, isInner, isInterface, mergeFrom, 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, mergeFrom, 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:
getAuthorizedModifiersin 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:ObjectModelClassReturns all parent classes for this class.- Specified by:
getSuperclassesin interfaceObjectModelClass- Returns:
- a Collection containing all parent ObjectModelClass for this class.
-
getInnerClassifiers
public Collection<ObjectModelClassifier> getInnerClassifiers()
Description copied from interface:ObjectModelClassReturns all inner classes for this class.- Specified by:
getInnerClassifiersin 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:
getDiscriminatorin 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:
getSpecialisationsin 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:
getSpecialisationsin 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:
isAbstractin interfaceObjectModelClass- Returns:
- a boolean indicating whether this class is abstract or not.
-
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- Overrides:
getAllOtherOperationsin 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:ObjectModelClassReturns all operations defined on all Super class extended by this classifier, directly or indirectly. and all interface implemented by the super class.- Specified by:
getAllSuperclassOperationsin 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:ObjectModelClassifierReturns all attributes defined on all super class extended by this classifier, directly or indirectly.- Specified by:
getAllOtherAttributesin interfaceObjectModelClassifier- Overrides:
getAllOtherAttributesin classObjectModelClassifierImpl- Returns:
- a Collection of ObjectModelAttribute
-
getAllOtherAttributes
protected Collection<ObjectModelAttribute> getAllOtherAttributes(Collection<ObjectModelAttribute> result)
-
toString
public String toString()
- Overrides:
toStringin classObjectModelClassifierImpl
-
mergeFrom
protected void mergeFrom(ObjectModelClassImpl source)
This method takes two ObjectModelClassImpl and merges both of them in the first one- Parameters:
source- the instance of ObjectModelClassImpl tu be used for merging
-
-