org.andromda.cartridges.java.metafacades
Class JavaClassLogic

java.lang.Object
  extended by org.andromda.core.metafacade.MetafacadeBase
      extended by org.andromda.cartridges.java.metafacades.JavaClassLogic
All Implemented Interfaces:
Serializable, Comparable, JavaClass, ClassifierFacade, GeneralizableElementFacade, ModelElementFacade
Direct Known Subclasses:
JavaClassLogicImpl

public abstract class JavaClassLogic
extends MetafacadeBase
implements JavaClass

Represents a Java class.

MetafacadeLogic for JavaClass

See Also:
JavaClass, Serialized Form

Field Summary
protected  Object metaObject
          The underlying UML object
 
Fields inherited from class org.andromda.core.metafacade.MetafacadeBase
contextRoot, logger
 
Constructor Summary
protected JavaClassLogic(Object metaObjectIn, String context)
          Create Metafacade implementation instance using the MetafacadeFactory from the context
 
Method Summary
 void copyTaggedValues(ModelElementFacade element)
           Copies all tagged values from the given ModelElementFacade to this model element facade.
 AttributeFacade findAttribute(String name)
           Return the attribute which name matches the parameter
 Object findTaggedValue(String tagName)
           Finds the tagged value with the specified 'tagName'.
 Object findTaggedValue(String tagName, boolean follow)
           Finds the tagged value optional searching the entire inheritance hierarchy if 'follow' is set to true.
 Collection findTaggedValues(String tagName)
           Returns all the values for the tagged value with the specified name.
 Collection<ClassifierFacade> getAbstractions()
           Those abstraction dependencies for which this classifier is the client.
 Collection<ClassifierFacade> getAllAssociatedClasses()
           Lists all classes associated to this one and any ancestor classes (through generalization).
 Collection<GeneralizableElementFacade> getAllGeneralizations()
           All generalizations for this generalizable element, goes up the inheritance tree.
 Collection getAllProperties()
           A collection containing all 'properties' of the classifier and its ancestors.
 Collection getAllRequiredConstructorParameters()
           A collection containing all required and/or read-only 'properties' of the classifier and its ancestors.
 Collection<GeneralizableElementFacade> getAllSpecializations()
           All specializations (travels down the inheritance hierarchy).
 ClassifierFacade getArray()
           Gets the array type for this classifier.
 String getArrayName()
           The name of the classifier as an array.
 Collection<ClassifierFacade> getAssociatedClasses()
           Lists the classes associated to this one, there is no repitition of classes.
 List<AssociationEndFacade> getAssociationEnds()
           Gets the association ends belonging to a classifier.
 List<AttributeFacade> getAttributes()
           Gets the attributes that belong to the classifier.
 List getAttributes(boolean follow)
           Gets all attributes for the classifier and if 'follow' is true goes up the inheritance hierarchy and gets the attributes from the super classes as well.
 String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
           Returns the fully qualified name of the model element.
 Collection<ConstraintFacade> getConstraints()
           Gets all constraints belonging to the model element.
 Collection getConstraints(String kind)
           Returns the constraints of the argument kind that have been placed onto this model.
 String getDocumentation(String indent)
           Gets the documentation for the model element, The indent argument is prefixed to each line.
 String getDocumentation(String indent, int lineLength)
           This method returns the documentation for this model element, with the lines wrapped after the specified number of characters, values of less than 1 will indicate no line wrapping is required.
 String getDocumentation(String indent, int lineLength, boolean htmlStyle)
           
 String getFullyQualifiedArrayName()
           The fully qualified name of the classifier as an array.
 String getFullyQualifiedInterfaceImplementationName()
           The fully qualified inteface implementation name.
 String getFullyQualifiedName()
           The fully qualified name of this model element.
 String getFullyQualifiedName(boolean modelName)
           Returns the fully qualified name of the model element.
 String getFullyQualifiedNamePath()
           Returns the fully qualified name as a path, the returned value always starts with out a slash '/'.
 GeneralizableElementFacade getGeneralization()
           Gets the direct generalization for this generalizable element.
 Collection<GeneralizationFacade> getGeneralizationLinks()
           Gets the actual links that this generalization element is part of (it plays either the specialization or generalization).
 String getGeneralizationList()
           A comma separated list of the fully qualified names of all generalizations.
 GeneralizableElementFacade getGeneralizationRoot()
           The element found when you recursively follow the generalization path up to the root.
 Collection<GeneralizableElementFacade> getGeneralizations()
           
 String getId()
           Gets the unique identifier of the underlying model element.
 Collection<OperationFacade> getImplementationOperations()
           Returns all those operations that could be implemented at this classifier's level.
 String getImplementedInterfaceList()
           A comma separated list of the fully qualified names of all implemented interfaces.
 Collection<AttributeFacade> getInstanceAttributes()
           Those attributes that are scoped to an instance of this class.
 List<OperationFacade> getInstanceOperations()
           Those operations that are scoped to an instance of this class.
 Collection<ClassifierFacade> getInterfaceAbstractions()
           Those interfaces that are abstractions of this classifier, this basically means this classifier realizes them.
 String getInterfaceImplementationName()
           The name of the interface implementation.
 String getJavaNewString()
           A String representing a new Constructor declaration for this classifier type to be used in a Java environment.
 String getJavaNullString()
           A String representing the null-value for this classifier type to be used in a Java environment.
 Collection<String> getKeywords()
           UML2: Retrieves the keywords for this element.
 String getLabel()
           UML2: Retrieves a localized label for this named element.
 TypeMappings getLanguageMappings()
           The language mappings that have been set for this model elemnt.
 ModelFacade getModel()
           
 String getName()
           The name of the model element.
 Collection<ClassifierFacade> getNavigableConnectingEnds()
           The other ends of this classifier's association ends which are navigable.
 List getNavigableConnectingEnds(boolean follow)
           Get the other ends of this classifier's association ends which are navigable and if 'follow' is true goes up the inheritance hierarchy and gets the super association ends as well.
 ClassifierFacade getNonArray()
           Assuming that the classifier is an array, this will return the non array type of the classifier from
 String getOperationCallFromAttributes()
           The attributes from this classifier in the form of an operation call (this example would be in Java): '(String attributeOne, String attributeTwo).
 List<OperationFacade> getOperations()
           The operations owned by this classifier.
 ModelElementFacade getPackage()
           Gets the package to which this model element belongs.
 String getPackageName()
           The name of this model element's package.
 String getPackageName(boolean modelName)
           Gets the package name (optionally providing the ability to retrieve the model name and not the mapped name).
 String getPackagePath()
           Returns the package as a path, the returned value always starts with out a slash '/'.
 List getProperties()
           A collection containing all 'properties' of the classifier.
 List getProperties(boolean follow)
           Gets all properties (attributes and navigable association ends) for the classifier and if 'follow' is true goes up the inheritance hierarchy and gets the properties from the super classes as well.
 String getQualifiedName()
           UML2: Returns the value of the 'Qualified Name' attribute.
 Collection getRequiredConstructorParameters()
           A collection containing all required and/or read-only 'properties' of the classifier.
 PackageFacade getRootPackage()
           Gets the root package for the model element.
 long getSerialVersionUID()
           Returns the serial version UID of the underlying model element.
 Collection<DependencyFacade> getSourceDependencies()
           Gets the dependencies for which this model element is the source.
 Collection<GeneralizableElementFacade> getSpecializations()
           Gets the direct specializations (i.e.
 StateMachineFacade getStateMachineContext()
           If this model element is the context of an activity graph, this represents that activity graph.
 Collection<AttributeFacade> getStaticAttributes()
           Those attributes that are scoped to the definition of this class.
 List<OperationFacade> getStaticOperations()
           Those operations that are scoped to the definition of this class.
 Collection<String> getStereotypeNames()
           The collection of ALL stereotype names for this model element.
 Collection<StereotypeFacade> getStereotypes()
           Gets all stereotypes for this model element.
 ClassifierFacade getSuperClass()
           This class' superclass, returns the generalization if it is a ClassifierFacade, null otherwise.
 Collection<TaggedValueFacade> getTaggedValues()
           
 Collection<DependencyFacade> getTargetDependencies()
           Gets the dependencies for which this model element is the target.
 Object getTemplateParameter(String parameterName)
           
 Collection<TemplateParameterFacade> getTemplateParameters()
           
 String getValidationName()
           
 Object getValidationOwner()
           
 String getVisibility()
           The visibility (i.e.
 String getWrapperName()
           The wrapper name for this classifier if a mapped type has a defined wrapper class (ie.
protected abstract  String handleGetFullyQualifiedInterfaceImplementationName()
           
protected abstract  String handleGetInterfaceImplementationName()
           
protected abstract  boolean handleIsAbstractInterfaceImplementation()
           
 boolean hasExactStereotype(String stereotypeName)
           Returns true if the model element has the exact stereotype (meaning no stereotype inheritance is taken into account when searching for the stereotype), false otherwise.
 boolean hasKeyword(String keywordName)
           Does the UML Element contain the named Keyword? Keywords can be separated by space, comma, pipe, semicolon, or << >>
 boolean hasStereotype(String stereotypeName)
           Returns true if the model element has the specified stereotype.
 void initialize()
           
 boolean isAbstract()
           Indicates if this classifier is 'abstract'.
 boolean isAbstractInterfaceImplementation()
           Whether or not the inteface implementation should be an abstract class.
 boolean isArrayType()
           True if this classifier represents an array type.
 boolean isAssociationClass()
           
 boolean isBindingDependenciesPresent()
           
 boolean isBlobType()
           Returns true if this type represents a Blob type.
 boolean isBooleanType()
           Indicates if this type represents a boolean type or not.
 boolean isCharacterType()
           Indicates if this type represents a char, Character, or java.lang.Character type or not.
 boolean isClassifierFacadeMetaType()
           
 boolean isClobType()
           Returns true if this type represents a Clob type.
 boolean isCollectionType()
           True if this classifier represents a collection type.
 boolean isConstraintsPresent()
           Indicates if any constraints are present on this model element.
 boolean isDataType()
           True/false depending on whether or not this classifier represents a datatype.
 boolean isDateType()
           True when this classifier is a date type.
 boolean isDocumentationPresent()
           Indicates if any documentation is present on this model element.
 boolean isDoubleType()
           Indicates if this type represents a Double type or not.
 boolean isEmbeddedValue()
           Indicates whether or not this classifier represents an "EmbeddedValue'.
 boolean isEnumeration()
           True if this classifier is in fact marked as an enumeration.
 boolean isFileType()
           Returns true if this type represents a 'file' type.
 boolean isFloatType()
           Indicates if this type represents a Float type or not.
 boolean isGeneralizableElementFacadeMetaType()
           
 boolean isIntegerType()
           Indicates if this type represents an int or Integer or java.lang.Integer type or not.
 boolean isInterface()
           True/false depending on whether or not this Classifier represents an interface.
 boolean isJavaClassMetaType()
          Indicates the metafacade type (used for metafacade mappings).
 boolean isLeaf()
           True if this classifier cannot be extended and represent a leaf in the inheritance tree.
 boolean isListType()
           True if this classifier represents a list type.
 boolean isLongType()
           Indicates if this type represents a Long type or not.
 boolean isMapType()
           Indicates whether or not this classifier represents a Map type.
 boolean isModelElementFacadeMetaType()
           
 boolean isPrimitive()
           Indicates whether or not this classifier represents a primitive type.
 boolean isReservedWord()
           True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
 boolean isSetType()
           True if this classifier represents a set type.
 boolean isStringType()
           Indicates whether or not this classifier represents a string type.
 boolean isTemplateParametersPresent()
           
 boolean isTimeType()
           Indicates whether or not this classifier represents a time type.
 boolean isWrappedPrimitive()
           Returns true if this type is a wrapped primitive type.
 void resetMetafacadeContext(String context)
          Reset context only for non-root metafacades
 String toString()
           
 String translateConstraint(String name, String translation)
           Searches for the constraint with the specified 'name' on this model element, and if found translates it using the specified 'translation' from a translation library discovered by the framework.
 String[] translateConstraints(String translation)
           Translates all constraints belonging to this model element with the given 'translation'.
 String[] translateConstraints(String kind, String translation)
           Translates the constraints of the specified 'kind' belonging to this model element.
 void validateInvariants(Collection<ModelValidationMessage> validationMessages)
           
 
Methods inherited from class org.andromda.core.metafacade.MetafacadeBase
compareTo, equals, getConfiguredProperty, getMetafacadeContext, getMetaObject, hashCode, isConfiguredProperty, isMetafacadePropertyCachingEnabled, setMetafacadeContext, setProperty, shieldedElement, shieldedElements, THIS, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

metaObject

protected Object metaObject
The underlying UML object

See Also:
Object
Constructor Detail

JavaClassLogic

protected JavaClassLogic(Object metaObjectIn,
                         String context)
Create Metafacade implementation instance using the MetafacadeFactory from the context

Parameters:
metaObjectIn -
context -
Method Detail

resetMetafacadeContext

public void resetMetafacadeContext(String context)
Reset context only for non-root metafacades

Overrides:
resetMetafacadeContext in class MetafacadeBase
Parameters:
context -
See Also:
MetafacadeBase.resetMetafacadeContext(String context)

isJavaClassMetaType

public boolean isJavaClassMetaType()
Description copied from interface: JavaClass
Indicates the metafacade type (used for metafacade mappings).

Specified by:
isJavaClassMetaType in interface JavaClass
Returns:
boolean true always
See Also:
JavaClass

handleGetInterfaceImplementationName

protected abstract String handleGetInterfaceImplementationName()
Returns:
String
See Also:
JavaClass.getInterfaceImplementationName()

getInterfaceImplementationName

public final String getInterfaceImplementationName()

The name of the interface implementation.

Specified by:
getInterfaceImplementationName in interface JavaClass
Returns:
(String)handleGetInterfaceImplementationName()

handleGetFullyQualifiedInterfaceImplementationName

protected abstract String handleGetFullyQualifiedInterfaceImplementationName()
Returns:
String
See Also:
JavaClass.getFullyQualifiedInterfaceImplementationName()

getFullyQualifiedInterfaceImplementationName

public final String getFullyQualifiedInterfaceImplementationName()

The fully qualified inteface implementation name.

Specified by:
getFullyQualifiedInterfaceImplementationName in interface JavaClass
Returns:
(String)handleGetFullyQualifiedInterfaceImplementationName()

handleIsAbstractInterfaceImplementation

protected abstract boolean handleIsAbstractInterfaceImplementation()
Returns:
boolean
See Also:
JavaClass.isAbstractInterfaceImplementation()

isAbstractInterfaceImplementation

public final boolean isAbstractInterfaceImplementation()

Whether or not the inteface implementation should be an abstract class.

Specified by:
isAbstractInterfaceImplementation in interface JavaClass
Returns:
(boolean)handleIsAbstractInterfaceImplementation()

isClassifierFacadeMetaType

public boolean isClassifierFacadeMetaType()
Specified by:
isClassifierFacadeMetaType in interface ClassifierFacade
Returns:
true
See Also:
ClassifierFacade

isGeneralizableElementFacadeMetaType

public boolean isGeneralizableElementFacadeMetaType()
Specified by:
isGeneralizableElementFacadeMetaType in interface GeneralizableElementFacade
Returns:
true
See Also:
GeneralizableElementFacade

isModelElementFacadeMetaType

public boolean isModelElementFacadeMetaType()
Specified by:
isModelElementFacadeMetaType in interface ModelElementFacade
Returns:
true
See Also:
ModelElementFacade

findAttribute

public AttributeFacade findAttribute(String name)

Return the attribute which name matches the parameter

Specified by:
findAttribute in interface ClassifierFacade
See Also:
ClassifierFacade.findAttribute(String name)

getAbstractions

public Collection<ClassifierFacade> getAbstractions()

Those abstraction dependencies for which this classifier is the client.

Specified by:
getAbstractions in interface ClassifierFacade
See Also:
ClassifierFacade.getAbstractions()

getAllAssociatedClasses

public Collection<ClassifierFacade> getAllAssociatedClasses()

Lists all classes associated to this one and any ancestor classes (through generalization). There will be no duplicates. The order of the elements is predictable.

Specified by:
getAllAssociatedClasses in interface ClassifierFacade
See Also:
ClassifierFacade.getAllAssociatedClasses()

getAllProperties

public Collection getAllProperties()

A collection containing all 'properties' of the classifier and its ancestors. Properties are any attributes and navigable connecting association ends.

Specified by:
getAllProperties in interface ClassifierFacade
See Also:
ClassifierFacade.getAllProperties()

getAllRequiredConstructorParameters

public Collection getAllRequiredConstructorParameters()

A collection containing all required and/or read-only 'properties' of the classifier and its ancestors. Properties are any attributes and navigable connecting association ends.

Specified by:
getAllRequiredConstructorParameters in interface ClassifierFacade
See Also:
ClassifierFacade.getAllRequiredConstructorParameters()

getArray

public ClassifierFacade getArray()

Gets the array type for this classifier. If this classifier already represents an array, it just returns itself.

Specified by:
getArray in interface ClassifierFacade
See Also:
ClassifierFacade.getArray()

getArrayName

public String getArrayName()

The name of the classifier as an array.

Specified by:
getArrayName in interface ClassifierFacade
See Also:
ClassifierFacade.getArrayName()

getAssociatedClasses

public Collection<ClassifierFacade> getAssociatedClasses()

Lists the classes associated to this one, there is no repitition of classes. The order of the elements is predictable.

Specified by:
getAssociatedClasses in interface ClassifierFacade
See Also:
ClassifierFacade.getAssociatedClasses()

getAssociationEnds

public List<AssociationEndFacade> getAssociationEnds()

Gets the association ends belonging to a classifier.

Specified by:
getAssociationEnds in interface ClassifierFacade
See Also:
ClassifierFacade.getAssociationEnds()

getAttributes

public List<AttributeFacade> getAttributes()

Gets the attributes that belong to the classifier.

Specified by:
getAttributes in interface ClassifierFacade
See Also:
ClassifierFacade.getAttributes()

getAttributes

public List getAttributes(boolean follow)

Gets all attributes for the classifier and if 'follow' is true goes up the inheritance hierarchy and gets the attributes from the super classes as well.

Specified by:
getAttributes in interface ClassifierFacade
See Also:
ClassifierFacade.getAttributes(boolean follow)

getFullyQualifiedArrayName

public String getFullyQualifiedArrayName()

The fully qualified name of the classifier as an array.

Specified by:
getFullyQualifiedArrayName in interface ClassifierFacade
See Also:
ClassifierFacade.getFullyQualifiedArrayName()

getImplementationOperations

public Collection<OperationFacade> getImplementationOperations()

Returns all those operations that could be implemented at this classifier's level. This means the operations owned by this classifier as well as any realized interface's operations (recursively) in case this classifier itself is not already an interface, or generalized when this classifier is an interface.

Specified by:
getImplementationOperations in interface ClassifierFacade
See Also:
ClassifierFacade.getImplementationOperations()

getImplementedInterfaceList

public String getImplementedInterfaceList()

A comma separated list of the fully qualified names of all implemented interfaces.

Specified by:
getImplementedInterfaceList in interface ClassifierFacade
See Also:
ClassifierFacade.getImplementedInterfaceList()

getInstanceAttributes

public Collection<AttributeFacade> getInstanceAttributes()

Those attributes that are scoped to an instance of this class.

Specified by:
getInstanceAttributes in interface ClassifierFacade
See Also:
ClassifierFacade.getInstanceAttributes()

getInstanceOperations

public List<OperationFacade> getInstanceOperations()

Those operations that are scoped to an instance of this class.

Specified by:
getInstanceOperations in interface ClassifierFacade
See Also:
ClassifierFacade.getInstanceOperations()

getInterfaceAbstractions

public Collection<ClassifierFacade> getInterfaceAbstractions()

Those interfaces that are abstractions of this classifier, this basically means this classifier realizes them.

Specified by:
getInterfaceAbstractions in interface ClassifierFacade
See Also:
ClassifierFacade.getInterfaceAbstractions()

getJavaNewString

public String getJavaNewString()

A String representing a new Constructor declaration for this classifier type to be used in a Java environment.

Specified by:
getJavaNewString in interface ClassifierFacade
See Also:
ClassifierFacade.getJavaNewString()

getJavaNullString

public String getJavaNullString()

A String representing the null-value for this classifier type to be used in a Java environment.

Specified by:
getJavaNullString in interface ClassifierFacade
See Also:
ClassifierFacade.getJavaNullString()

getNavigableConnectingEnds

public Collection<ClassifierFacade> getNavigableConnectingEnds()

The other ends of this classifier's association ends which are navigable.

Specified by:
getNavigableConnectingEnds in interface ClassifierFacade
See Also:
ClassifierFacade.getNavigableConnectingEnds()

getNavigableConnectingEnds

public List getNavigableConnectingEnds(boolean follow)

Get the other ends of this classifier's association ends which are navigable and if 'follow' is true goes up the inheritance hierarchy and gets the super association ends as well.

Specified by:
getNavigableConnectingEnds in interface ClassifierFacade
See Also:
ClassifierFacade.getNavigableConnectingEnds(boolean follow)

getNonArray

public ClassifierFacade getNonArray()

Assuming that the classifier is an array, this will return the non array type of the classifier from

the model. If the classifier is NOT an array, it will just return itself.

Specified by:
getNonArray in interface ClassifierFacade
See Also:
ClassifierFacade.getNonArray()

getOperationCallFromAttributes

public String getOperationCallFromAttributes()

The attributes from this classifier in the form of an operation call (this example would be in Java): '(String attributeOne, String attributeTwo). If there were no attributes on the classifier, the result would be an empty '()'.

Specified by:
getOperationCallFromAttributes in interface ClassifierFacade
See Also:
ClassifierFacade.getOperationCallFromAttributes()

getOperations

public List<OperationFacade> getOperations()

The operations owned by this classifier.

Specified by:
getOperations in interface ClassifierFacade
See Also:
ClassifierFacade.getOperations()

getProperties

public List getProperties()

A collection containing all 'properties' of the classifier. Properties are any attributes and navigable connecting association ends.

Specified by:
getProperties in interface ClassifierFacade
See Also:
ClassifierFacade.getProperties()

getProperties

public List getProperties(boolean follow)

Gets all properties (attributes and navigable association ends) for the classifier and if 'follow' is true goes up the inheritance hierarchy and gets the properties from the super classes as well.

Specified by:
getProperties in interface ClassifierFacade
See Also:
ClassifierFacade.getProperties(boolean follow)

getRequiredConstructorParameters

public Collection getRequiredConstructorParameters()

A collection containing all required and/or read-only 'properties' of the classifier. Properties are any attributes and navigable connecting association ends.

Specified by:
getRequiredConstructorParameters in interface ClassifierFacade
See Also:
ClassifierFacade.getRequiredConstructorParameters()

getSerialVersionUID

public long getSerialVersionUID()

Returns the serial version UID of the underlying model element.

Specified by:
getSerialVersionUID in interface ClassifierFacade
See Also:
ClassifierFacade.getSerialVersionUID()

getStaticAttributes

public Collection<AttributeFacade> getStaticAttributes()

Those attributes that are scoped to the definition of this class.

Specified by:
getStaticAttributes in interface ClassifierFacade
See Also:
ClassifierFacade.getStaticAttributes()

getStaticOperations

public List<OperationFacade> getStaticOperations()

Those operations that are scoped to the definition of this class.

Specified by:
getStaticOperations in interface ClassifierFacade
See Also:
ClassifierFacade.getStaticOperations()

getSuperClass

public ClassifierFacade getSuperClass()

This class' superclass, returns the generalization if it is a ClassifierFacade, null otherwise.

Specified by:
getSuperClass in interface ClassifierFacade
See Also:
ClassifierFacade.getSuperClass()

getWrapperName

public String getWrapperName()

The wrapper name for this classifier if a mapped type has a defined wrapper class (ie. 'long' maps to 'Long'). If the classifier doesn't have a wrapper defined for it, this method will return a null. Note that wrapper mappings must be defined for the namespace by defining the 'wrapperMappingsUri', this property must point to the location of the mappings file which maps the primitives to wrapper types.

Specified by:
getWrapperName in interface ClassifierFacade
See Also:
ClassifierFacade.getWrapperName()

isAbstract

public boolean isAbstract()

Indicates if this classifier is 'abstract'.

Specified by:
isAbstract in interface ClassifierFacade
See Also:
ClassifierFacade.isAbstract()

isArrayType

public boolean isArrayType()

True if this classifier represents an array type. False otherwise.

Specified by:
isArrayType in interface ClassifierFacade
See Also:
ClassifierFacade.isArrayType()

isAssociationClass

public boolean isAssociationClass()
Specified by:
isAssociationClass in interface ClassifierFacade
See Also:
ClassifierFacade.isAssociationClass()

isBlobType

public boolean isBlobType()

Returns true if this type represents a Blob type.

Specified by:
isBlobType in interface ClassifierFacade
See Also:
ClassifierFacade.isBlobType()

isBooleanType

public boolean isBooleanType()

Indicates if this type represents a boolean type or not.

Specified by:
isBooleanType in interface ClassifierFacade
See Also:
ClassifierFacade.isBooleanType()

isCharacterType

public boolean isCharacterType()

Indicates if this type represents a char, Character, or java.lang.Character type or not.

Specified by:
isCharacterType in interface ClassifierFacade
See Also:
ClassifierFacade.isCharacterType()

isClobType

public boolean isClobType()

Returns true if this type represents a Clob type.

Specified by:
isClobType in interface ClassifierFacade
See Also:
ClassifierFacade.isClobType()

isCollectionType

public boolean isCollectionType()

True if this classifier represents a collection type. False otherwise.

Specified by:
isCollectionType in interface ClassifierFacade
See Also:
ClassifierFacade.isCollectionType()

isDataType

public boolean isDataType()

True/false depending on whether or not this classifier represents a datatype. A data type is a type whose instances are identified only by their value. A data type may contain attributes to support the modeling of structured data types.

Specified by:
isDataType in interface ClassifierFacade
See Also:
ClassifierFacade.isDataType()

isDateType

public boolean isDateType()

True when this classifier is a date type.

Specified by:
isDateType in interface ClassifierFacade
See Also:
ClassifierFacade.isDateType()

isDoubleType

public boolean isDoubleType()

Indicates if this type represents a Double type or not.

Specified by:
isDoubleType in interface ClassifierFacade
See Also:
ClassifierFacade.isDoubleType()

isEmbeddedValue

public boolean isEmbeddedValue()

Indicates whether or not this classifier represents an "EmbeddedValue'.

Specified by:
isEmbeddedValue in interface ClassifierFacade
See Also:
ClassifierFacade.isEmbeddedValue()

isEnumeration

public boolean isEnumeration()

True if this classifier is in fact marked as an enumeration.

Specified by:
isEnumeration in interface ClassifierFacade
See Also:
ClassifierFacade.isEnumeration()

isFileType

public boolean isFileType()

Returns true if this type represents a 'file' type.

Specified by:
isFileType in interface ClassifierFacade
See Also:
ClassifierFacade.isFileType()

isFloatType

public boolean isFloatType()

Indicates if this type represents a Float type or not.

Specified by:
isFloatType in interface ClassifierFacade
See Also:
ClassifierFacade.isFloatType()

isIntegerType

public boolean isIntegerType()

Indicates if this type represents an int or Integer or java.lang.Integer type or not.

Specified by:
isIntegerType in interface ClassifierFacade
See Also:
ClassifierFacade.isIntegerType()

isInterface

public boolean isInterface()

True/false depending on whether or not this Classifier represents an interface.

Specified by:
isInterface in interface ClassifierFacade
See Also:
ClassifierFacade.isInterface()

isLeaf

public boolean isLeaf()

True if this classifier cannot be extended and represent a leaf in the inheritance tree.

Specified by:
isLeaf in interface ClassifierFacade
See Also:
ClassifierFacade.isLeaf()

isListType

public boolean isListType()

True if this classifier represents a list type. False otherwise.

Specified by:
isListType in interface ClassifierFacade
See Also:
ClassifierFacade.isListType()

isLongType

public boolean isLongType()

Indicates if this type represents a Long type or not.

Specified by:
isLongType in interface ClassifierFacade
See Also:
ClassifierFacade.isLongType()

isMapType

public boolean isMapType()

Indicates whether or not this classifier represents a Map type.

Specified by:
isMapType in interface ClassifierFacade
See Also:
ClassifierFacade.isMapType()

isPrimitive

public boolean isPrimitive()

Indicates whether or not this classifier represents a primitive type.

Specified by:
isPrimitive in interface ClassifierFacade
See Also:
ClassifierFacade.isPrimitive()

isSetType

public boolean isSetType()

True if this classifier represents a set type. False otherwise.

Specified by:
isSetType in interface ClassifierFacade
See Also:
ClassifierFacade.isSetType()

isStringType

public boolean isStringType()

Indicates whether or not this classifier represents a string type.

Specified by:
isStringType in interface ClassifierFacade
See Also:
ClassifierFacade.isStringType()

isTimeType

public boolean isTimeType()

Indicates whether or not this classifier represents a time type.

Specified by:
isTimeType in interface ClassifierFacade
See Also:
ClassifierFacade.isTimeType()

isWrappedPrimitive

public boolean isWrappedPrimitive()

Returns true if this type is a wrapped primitive type.

Specified by:
isWrappedPrimitive in interface ClassifierFacade
See Also:
ClassifierFacade.isWrappedPrimitive()

findTaggedValue

public Object findTaggedValue(String tagName,
                              boolean follow)

Finds the tagged value optional searching the entire inheritance hierarchy if 'follow' is set to true.

Specified by:
findTaggedValue in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.findTaggedValue(String tagName, boolean follow)

getAllGeneralizations

public Collection<GeneralizableElementFacade> getAllGeneralizations()

All generalizations for this generalizable element, goes up the inheritance tree.

Specified by:
getAllGeneralizations in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getAllGeneralizations()

getAllSpecializations

public Collection<GeneralizableElementFacade> getAllSpecializations()

All specializations (travels down the inheritance hierarchy).

Specified by:
getAllSpecializations in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getAllSpecializations()

getGeneralization

public GeneralizableElementFacade getGeneralization()

Gets the direct generalization for this generalizable element.

Specified by:
getGeneralization in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getGeneralization()

getGeneralizationLinks

public Collection<GeneralizationFacade> getGeneralizationLinks()

Gets the actual links that this generalization element is part of (it plays either the specialization or generalization).

Specified by:
getGeneralizationLinks in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getGeneralizationLinks()

getGeneralizationList

public String getGeneralizationList()

A comma separated list of the fully qualified names of all generalizations.

Specified by:
getGeneralizationList in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getGeneralizationList()

getGeneralizationRoot

public GeneralizableElementFacade getGeneralizationRoot()

The element found when you recursively follow the generalization path up to the root. If an element has no generalization itself will be considered the root.

Specified by:
getGeneralizationRoot in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getGeneralizationRoot()

getGeneralizations

public Collection<GeneralizableElementFacade> getGeneralizations()
Specified by:
getGeneralizations in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getGeneralizations()

getSpecializations

public Collection<GeneralizableElementFacade> getSpecializations()

Gets the direct specializations (i.e. sub elements) for this generalizatble element.

Specified by:
getSpecializations in interface GeneralizableElementFacade
See Also:
GeneralizableElementFacade.getSpecializations()

copyTaggedValues

public void copyTaggedValues(ModelElementFacade element)

Copies all tagged values from the given ModelElementFacade to this model element facade.

Specified by:
copyTaggedValues in interface ModelElementFacade
See Also:
ModelElementFacade.copyTaggedValues(ModelElementFacade element)

findTaggedValue

public Object findTaggedValue(String tagName)

Finds the tagged value with the specified 'tagName'. In case there are more values the first one found will be returned.

Specified by:
findTaggedValue in interface ModelElementFacade
See Also:
ModelElementFacade.findTaggedValue(String tagName)

findTaggedValues

public Collection findTaggedValues(String tagName)

Returns all the values for the tagged value with the specified name. The returned collection will contains only String instances, or will be empty. Never null.

Specified by:
findTaggedValues in interface ModelElementFacade
See Also:
ModelElementFacade.findTaggedValues(String tagName)

getBindedFullyQualifiedName

public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)

Returns the fully qualified name of the model element. The fully qualified name includes complete package qualified name of the underlying model element. The templates parameter will be replaced by the correct one given the binding relation of the parameter to this element.

Specified by:
getBindedFullyQualifiedName in interface ModelElementFacade
See Also:
ModelElementFacade.getBindedFullyQualifiedName(ModelElementFacade bindedElement)

getConstraints

public Collection<ConstraintFacade> getConstraints()

Gets all constraints belonging to the model element.

Specified by:
getConstraints in interface ModelElementFacade
See Also:
ModelElementFacade.getConstraints()

getConstraints

public Collection getConstraints(String kind)

Returns the constraints of the argument kind that have been placed onto this model. Typical kinds are "inv", "pre" and "post". Other kinds are possible.

Specified by:
getConstraints in interface ModelElementFacade
See Also:
ModelElementFacade.getConstraints(String kind)

getDocumentation

public String getDocumentation(String indent)

Gets the documentation for the model element, The indent argument is prefixed to each line. By default this method wraps lines after 64 characters.

This method is equivalent to getDocumentation(indent, 64).

Specified by:
getDocumentation in interface ModelElementFacade
See Also:
ModelElementFacade.getDocumentation(String indent)

getDocumentation

public String getDocumentation(String indent,
                               int lineLength)

This method returns the documentation for this model element, with the lines wrapped after the specified number of characters, values of less than 1 will indicate no line wrapping is required. By default paragraphs are returned as HTML.

This method is equivalent to getDocumentation(indent, lineLength, true).

Specified by:
getDocumentation in interface ModelElementFacade
See Also:
ModelElementFacade.getDocumentation(String indent, int lineLength)

getDocumentation

public String getDocumentation(String indent,
                               int lineLength,
                               boolean htmlStyle)
Specified by:
getDocumentation in interface ModelElementFacade
See Also:
ModelElementFacade.getDocumentation(String indent, int lineLength, boolean htmlStyle)

getFullyQualifiedName

public String getFullyQualifiedName()

The fully qualified name of this model element.

Specified by:
getFullyQualifiedName in interface ModelElementFacade
See Also:
ModelElementFacade.getFullyQualifiedName()

getFullyQualifiedName

public String getFullyQualifiedName(boolean modelName)

Returns the fully qualified name of the model element. The fully qualified name includes complete package qualified name of the underlying model element. If modelName is true, then the original name of the model element (the name contained within the model) will be the name returned, otherwise a name from a language mapping will be returned.

Specified by:
getFullyQualifiedName in interface ModelElementFacade
See Also:
ModelElementFacade.getFullyQualifiedName(boolean modelName)

getFullyQualifiedNamePath

public String getFullyQualifiedNamePath()

Returns the fully qualified name as a path, the returned value always starts with out a slash '/'.

Specified by:
getFullyQualifiedNamePath in interface ModelElementFacade
See Also:
ModelElementFacade.getFullyQualifiedNamePath()

getId

public String getId()

Gets the unique identifier of the underlying model element.

Specified by:
getId in interface ModelElementFacade
See Also:
ModelElementFacade.getId()

getKeywords

public Collection<String> getKeywords()

UML2: Retrieves the keywords for this element. Used to modify implementation properties which are not represented by other properties, i.e. native, transient, volatile, synchronized, (added annotations) override, deprecated. Can also be used to suppress compiler warnings: (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require JDK5 compiler level.

Specified by:
getKeywords in interface ModelElementFacade
See Also:
ModelElementFacade.getKeywords()

getLabel

public String getLabel()

UML2: Retrieves a localized label for this named element.

Specified by:
getLabel in interface ModelElementFacade
See Also:
ModelElementFacade.getLabel()

getLanguageMappings

public TypeMappings getLanguageMappings()

The language mappings that have been set for this model elemnt.

Specified by:
getLanguageMappings in interface ModelElementFacade
See Also:
ModelElementFacade.getLanguageMappings()

getModel

public ModelFacade getModel()
Specified by:
getModel in interface ModelElementFacade
See Also:
ModelElementFacade.getModel()

getName

public String getName()

The name of the model element.

Specified by:
getName in interface ModelElementFacade
See Also:
ModelElementFacade.getName()

getPackage

public ModelElementFacade getPackage()

Gets the package to which this model element belongs.

Specified by:
getPackage in interface ModelElementFacade
See Also:
ModelElementFacade.getPackage()

getPackageName

public String getPackageName()

The name of this model element's package.

Specified by:
getPackageName in interface ModelElementFacade
See Also:
ModelElementFacade.getPackageName()

getPackageName

public String getPackageName(boolean modelName)

Gets the package name (optionally providing the ability to retrieve the model name and not the mapped name).

Specified by:
getPackageName in interface ModelElementFacade
See Also:
ModelElementFacade.getPackageName(boolean modelName)

getPackagePath

public String getPackagePath()

Returns the package as a path, the returned value always starts with out a slash '/'.

Specified by:
getPackagePath in interface ModelElementFacade
See Also:
ModelElementFacade.getPackagePath()

getQualifiedName

public String getQualifiedName()

UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself.

Specified by:
getQualifiedName in interface ModelElementFacade
See Also:
ModelElementFacade.getQualifiedName()

getRootPackage

public PackageFacade getRootPackage()

Gets the root package for the model element.

Specified by:
getRootPackage in interface ModelElementFacade
See Also:
ModelElementFacade.getRootPackage()

getSourceDependencies

public Collection<DependencyFacade> getSourceDependencies()

Gets the dependencies for which this model element is the source.

Specified by:
getSourceDependencies in interface ModelElementFacade
See Also:
ModelElementFacade.getSourceDependencies()

getStateMachineContext

public StateMachineFacade getStateMachineContext()

If this model element is the context of an activity graph, this represents that activity graph.

Specified by:
getStateMachineContext in interface ModelElementFacade
See Also:
ModelElementFacade.getStateMachineContext()

getStereotypeNames

public Collection<String> getStereotypeNames()

The collection of ALL stereotype names for this model element.

Specified by:
getStereotypeNames in interface ModelElementFacade
See Also:
ModelElementFacade.getStereotypeNames()

getStereotypes

public Collection<StereotypeFacade> getStereotypes()

Gets all stereotypes for this model element.

Specified by:
getStereotypes in interface ModelElementFacade
See Also:
ModelElementFacade.getStereotypes()

getTaggedValues

public Collection<TaggedValueFacade> getTaggedValues()
Specified by:
getTaggedValues in interface ModelElementFacade
See Also:
ModelElementFacade.getTaggedValues()

getTargetDependencies

public Collection<DependencyFacade> getTargetDependencies()

Gets the dependencies for which this model element is the target.

Specified by:
getTargetDependencies in interface ModelElementFacade
See Also:
ModelElementFacade.getTargetDependencies()

getTemplateParameter

public Object getTemplateParameter(String parameterName)
Specified by:
getTemplateParameter in interface ModelElementFacade
See Also:
ModelElementFacade.getTemplateParameter(String parameterName)

getTemplateParameters

public Collection<TemplateParameterFacade> getTemplateParameters()
Specified by:
getTemplateParameters in interface ModelElementFacade
See Also:
ModelElementFacade.getTemplateParameters()

getVisibility

public String getVisibility()

The visibility (i.e. public, private, protected or package) of the model element, will attempt a lookup for these values in the language mappings (if any).

Specified by:
getVisibility in interface ModelElementFacade
See Also:
ModelElementFacade.getVisibility()

hasExactStereotype

public boolean hasExactStereotype(String stereotypeName)

Returns true if the model element has the exact stereotype (meaning no stereotype inheritance is taken into account when searching for the stereotype), false otherwise.

Specified by:
hasExactStereotype in interface ModelElementFacade
See Also:
ModelElementFacade.hasExactStereotype(String stereotypeName)

hasKeyword

public boolean hasKeyword(String keywordName)

Does the UML Element contain the named Keyword? Keywords can be separated by space, comma, pipe, semicolon, or << >>

Specified by:
hasKeyword in interface ModelElementFacade
See Also:
ModelElementFacade.hasKeyword(String keywordName)

hasStereotype

public boolean hasStereotype(String stereotypeName)

Returns true if the model element has the specified stereotype. If the stereotype itself does not match, then a search will be made up the stereotype inheritance hierarchy, and if one of the stereotype's ancestors has a matching name this method will return true, false otherwise.

For example, if we have a certain stereotype called <> and a model element has a stereotype called <> which extends <>, when calling this method with 'stereotypeName' defined as 'exception' the method would return true since <> inherits from <>. If you want to check if the model element has the exact stereotype, then use the method 'hasExactStereotype' instead.

Specified by:
hasStereotype in interface ModelElementFacade
See Also:
ModelElementFacade.hasStereotype(String stereotypeName)

isBindingDependenciesPresent

public boolean isBindingDependenciesPresent()
Specified by:
isBindingDependenciesPresent in interface ModelElementFacade
See Also:
ModelElementFacade.isBindingDependenciesPresent()

isConstraintsPresent

public boolean isConstraintsPresent()

Indicates if any constraints are present on this model element.

Specified by:
isConstraintsPresent in interface ModelElementFacade
See Also:
ModelElementFacade.isConstraintsPresent()

isDocumentationPresent

public boolean isDocumentationPresent()

Indicates if any documentation is present on this model element.

Specified by:
isDocumentationPresent in interface ModelElementFacade
See Also:
ModelElementFacade.isDocumentationPresent()

isReservedWord

public boolean isReservedWord()

True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.

Specified by:
isReservedWord in interface ModelElementFacade
See Also:
ModelElementFacade.isReservedWord()

isTemplateParametersPresent

public boolean isTemplateParametersPresent()
Specified by:
isTemplateParametersPresent in interface ModelElementFacade
See Also:
ModelElementFacade.isTemplateParametersPresent()

translateConstraint

public String translateConstraint(String name,
                                  String translation)

Searches for the constraint with the specified 'name' on this model element, and if found translates it using the specified 'translation' from a translation library discovered by the framework.

Specified by:
translateConstraint in interface ModelElementFacade
See Also:
ModelElementFacade.translateConstraint(String name, String translation)

translateConstraints

public String[] translateConstraints(String translation)

Translates all constraints belonging to this model element with the given 'translation'.

Specified by:
translateConstraints in interface ModelElementFacade
See Also:
ModelElementFacade.translateConstraints(String translation)

translateConstraints

public String[] translateConstraints(String kind,
                                     String translation)

Translates the constraints of the specified 'kind' belonging to this model element.

Specified by:
translateConstraints in interface ModelElementFacade
See Also:
ModelElementFacade.translateConstraints(String kind, String translation)

initialize

public void initialize()
Specified by:
initialize in interface ModelElementFacade
Overrides:
initialize in class MetafacadeBase
See Also:
MetafacadeBase.initialize()

getValidationOwner

public Object getValidationOwner()
Specified by:
getValidationOwner in interface ModelElementFacade
Overrides:
getValidationOwner in class MetafacadeBase
Returns:
Object getSuperClassifierFacade().getValidationOwner()
See Also:
MetafacadeBase.getValidationOwner()

getValidationName

public String getValidationName()
Specified by:
getValidationName in interface ModelElementFacade
Overrides:
getValidationName in class MetafacadeBase
Returns:
String getSuperClassifierFacade().getValidationName()
See Also:
MetafacadeBase.getValidationName()

validateInvariants

public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
Specified by:
validateInvariants in interface ModelElementFacade
Overrides:
validateInvariants in class MetafacadeBase
Parameters:
validationMessages - Collection
See Also:
MetafacadeBase.validateInvariants(Collection validationMessages)

toString

public String toString()
Overrides:
toString in class MetafacadeBase
See Also:
Object.toString()


Copyright © 2003-2012 AndroMDA.org. All Rights Reserved.