com.sodius.mdw.core.eval.project
Interface Type


public interface Type

Describes a type on which scripts are defined.

A type is defined in a metamodel and may correspond to a profile element.

This interface is not intended to be implemented by clients.

See Also:
Project.getTypes(), Script.getType()

Method Summary
 Collection<Script> getAllScripts()
          Returns all scripts defined on the super-type hierarchy of this type in the project scope.
 Class<?> getInstanceClass()
          Returns the Java instance class that this type represents (com.sodius.mdw.metamodel.uml21.Classifier for example).
 Metamodel getMetamodel()
          The metamodel from which this type originates.
 String getName()
          Returns the simple name of this type ("Classifier", or "Class:EJB" for example).
 String getProfileName()
          Returns the profile name part of this type ("EJB" for example).
 Collection<Script> getScripts()
          Returns the scripts defined on this type in the project scope.
 Collection<Type> getSubTypes()
          Returns a collection of sub-types which define at least one script in the project scope.
 Collection<Type> getSuperTypes()
          Returns a collection of super-types which define at least one script in the project scope.
 boolean isLeaf()
          Determines whether this is a leaf type, i.e. if there is no script defined on sub-types in the scope of this project.
 boolean isProfileType()
          Determines whether this type is defined in a profile.
 boolean isRoot()
          Determines whether this is a root type, i.e. if there is no script defined on super-types in the scope of this project.
 

Method Detail

getMetamodel

Metamodel getMetamodel()
The metamodel from which this type originates.

Returns:
the type metamodel.

getName

String getName()
Returns the simple name of this type ("Classifier", or "Class:EJB" for example).

Returns:
the type simple name.
See Also:
getInstanceClass()

getInstanceClass

Class<?> getInstanceClass()
Returns the Java instance class that this type represents (com.sodius.mdw.metamodel.uml21.Classifier for example).

Returns:
the Java instance class that this type represents.

isProfileType

boolean isProfileType()
Determines whether this type is defined in a profile.

Returns:
true if this type comes from a profile, false otherwise.

getProfileName

String getProfileName()
Returns the profile name part of this type ("EJB" for example).

Returns:
the profile name part of this type name, null if this is not a profile type.
See Also:
getName(), isProfileType()

isRoot

boolean isRoot()
Determines whether this is a root type, i.e. if there is no script defined on super-types in the scope of this project.

Returns:
true if there are no super-types which define scripts in this project, false otherwise.

getSuperTypes

Collection<Type> getSuperTypes()
Returns a collection of super-types which define at least one script in the project scope.

Returns:
an unmodifiable collection of Type elements.

isLeaf

boolean isLeaf()
Determines whether this is a leaf type, i.e. if there is no script defined on sub-types in the scope of this project.

Returns:
true if there are no sub-types which define scripts in this project, false otherwise.

getSubTypes

Collection<Type> getSubTypes()
Returns a collection of sub-types which define at least one script in the project scope.

Returns:
an unmodifiable collection of Type elements.

getScripts

Collection<Script> getScripts()
Returns the scripts defined on this type in the project scope.

Returns:
an unmodifiable collection of Script elements defined on this type.

getAllScripts

Collection<Script> getAllScripts()
Returns all scripts defined on the super-type hierarchy of this type in the project scope. The returned collection is not visibility filtered.

Returns:
an unmodifiable collection of Script elements defined on this type or on one of its super-type.