Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.uml.generator

Class PreparedClassifier


public class PreparedClassifier

This class contains the prepared information for an classifier. The information can directly be used in the code generation.
See also:
com.gentleware.poseidon.uml.generator.PreparedModelElement
com.gentleware.poseidon.generator.ElementPreparator
ModelElementPreparator


 Method Summary
public String   check()
Does a test on the validity of the element. 
protected String   checkGeneralizations()
Tests wether the classifier owns more than one super class. 
protected String   checkImports()
 
protected String   checkPackage()
 
protected String   checkSpecifications()
 
public String   checkVisibility()
Tests whether the illegal visibilities protected or private of inner classes in interfaces are set. 
protected String   generateGeneralizationString()
 
protected List   generateGeneralizations()
Produce a list of generalizations. 
protected String   generatePackageString()
 
protected String   generateSpecificationString()
 
protected List   generateSpecifications()
 
protected List   generateStates()
 
public String   getAbstractAsString()
Returns a string reflecting whether the related classifier is abstract. 
public Collection   getAssociationEnds()
Returns a collection of the association ends for the related classifier. 
public String   getDescription()
Returns the tagged value "documentation". 
public Hashtable   getEndRoles()
Returns a map of the roles of the association ends for the related classifier. 
public String   getGeneralizationString()
Returns the generalizations for the related classifier as a string. 
public String   getGeneralizations()
Returns the generalizations for the related classifier as a string. 
public Set   getImports()
Returns a set of packages and classes to be imported for the related classifier. 
public List   getInnerClassifiers()
Returns a list of prepared elements representing the inner classes of the related classifier. 
public String   getLeafAsString()
Returns a string reflecting whether the related classifier is a leaf. 
public String   getNameAsString(String context , String postfix )
Returns the name of the classifier, qualified according to the context. 
public String   getOwnerScopeAsString()
Returns a String designating the owner scope. 
public String   getPackageString()
Returns the package information of the related classifier as a string. 
public List   getPreparedAttributes()
Returns a list of the prepared elements representing the attributes of the related classifier. 
public List   getPreparedOperations()
Returns a list of the prepared elements representing the operations of the related classifier. 
public List   getPreparedOppositeAssociationEnds()
Returns a list of the prepared elements representing the opposite association ends of the related classifier. 
public List   getSpecificationList(String additionalSpecification )
Returns a list of the specifications for the related classifier. 
public String   getSpecificationString()
Returns the specifications for the related classifier as a string. 
public String   getSpecifications()
Returns the specifications for the related classifier as a string. 
public List   getStateNames()
Returns the list of names of the states defined for the related classifier. 
public List   getStates()
Returns the list of states defined for the related classifier. 
public boolean   hasConstructor()
Tests, if the related classifier has at least one constructor  
public void   init( Classifier element , ModelElementPreparator preparator )
Initializes this instance. 
public boolean   isAbstract()
Tests if the related classifier is abstract. 
public boolean   isInterface()
Tests, if the related classifier is an interface,  
public boolean   isLeaf()
Tests if the related classifier is a leaf. 
public boolean   isStatic()
Tests if the related classifier is static. 
protected void   prepareAttributes()
 
protected Set   prepareImports()
Does . 
protected void   prepareInnerClassifiers()
 
protected void   prepareOperations()
 
protected void   prepareOppositeAssociationEnds()
 
arrow_up
 

 

 Method Detail

check

public String check()

Does a test on the validity of the element. A number of tests is called subsequently. Also, the check method is called for every dependent model element of the related classifier (such as attributes and operations).
Returns:
Concatenation of messages occuring while testing this prepared element.
 
arrow_up
 
 

checkGeneralizations

protected String checkGeneralizations()

Tests wether the classifier owns more than one super class. Returns a warning, if the class owns more than one super class.
Returns:
 
arrow_up
 
 

checkImports

protected String checkImports()

 
arrow_up
 
 

checkPackage

protected String checkPackage()

 
arrow_up
 
 

checkSpecifications

protected String checkSpecifications()

 
arrow_up
 
 

checkVisibility

public String checkVisibility()

Tests whether the illegal visibilities protected or private of inner classes in interfaces are set. 
arrow_up
 
 

generateGeneralizationString

protected String generateGeneralizationString()

 
arrow_up
 
 

generateGeneralizations

protected List generateGeneralizations()

Produce a list of generalizations.
Returns:
A List of the generalizations, possible empty.
 
arrow_up
 
 

generatePackageString

protected String generatePackageString()

 
arrow_up
 
 

generateSpecificationString

protected String generateSpecificationString()

 
arrow_up
 
 

generateSpecifications

protected List generateSpecifications()

 
arrow_up
 
 

generateStates

protected List generateStates()

 
arrow_up
 
 

getAbstractAsString

public String getAbstractAsString()

Returns a string reflecting whether the related classifier is abstract.
Returns:
"abstract ", if the element is abstract, otherwise "".
 
arrow_up
 
 

getAssociationEnds

public Collection getAssociationEnds()

Returns a collection of the association ends for the related classifier.
Returns:
The collection of associations ends.
 
arrow_up
 
 

getDescription

public String getDescription()

Returns the tagged value "documentation". The returned string is in no way preparated.
Returns:
The value of the tagged value.
 
arrow_up
 
 

getEndRoles

public Hashtable getEndRoles()

Returns a map of the roles of the association ends for the related classifier.
Returns:
The map of roles.
 
arrow_up
 
 

getGeneralizationString

public String getGeneralizationString()

Returns the generalizations for the related classifier as a string. The individual entries are separated by colons. The string can be used directly for the code generation.
Returns:
The generalizations as colon-separated string.
 
arrow_up
 
 

getGeneralizations

public String getGeneralizations()

Returns the generalizations for the related classifier as a string. The individual entries are separated by colons. The string can be used directly for the code generation.
Returns:
The generalizations as colon-separated string.
 
arrow_up
 
 

getImports

public Set getImports()

Returns a set of packages and classes to be imported for the related classifier. Each entry is a fully qualified string to a package or class in a Java compatible notation (e.g. "java.util.*").
Returns:
The set of imported packages and classes.
 
arrow_up
 
 

getInnerClassifiers

public List getInnerClassifiers()

Returns a list of prepared elements representing the inner classes of the related classifier.
Returns:
The list of prepared inner classes.
 
arrow_up
 
 

getLeafAsString

public String getLeafAsString()

Returns a string reflecting whether the related classifier is a leaf.
Returns:
"final ", if the element is a leaf, otherwise "".
 
arrow_up
 
 

getNameAsString

public String getNameAsString(String context , String postfix )

Returns the name of the classifier, qualified according to the context. This is a special handling required for inner classes, that are referenced by their short name from the outer class, but with their qualified name (that is, with the outer classifier) from classes in the same package.
Parameters:
context - The element that uses the classifier.
Returns:
A name that is qualified as necessary with the outer class or not.
 
arrow_up
 
 

getOwnerScopeAsString

public String getOwnerScopeAsString()

Returns a String designating the owner scope.
Returns:
"static " or "".
 
arrow_up
 
 

getPackageString

public String getPackageString()

Returns the package information of the related classifier as a string.
Returns:
The string representing the package.
 
arrow_up
 
 

getPreparedAttributes

public List getPreparedAttributes()

Returns a list of the prepared elements representing the attributes of the related classifier.
Returns:
The list of prepared elements.
 
arrow_up
 
 

getPreparedOperations

public List getPreparedOperations()

Returns a list of the prepared elements representing the operations of the related classifier.
Returns:
The list of prepared elements.
 
arrow_up
 
 

getPreparedOppositeAssociationEnds

public List getPreparedOppositeAssociationEnds()

Returns a list of the prepared elements representing the opposite association ends of the related classifier.
Returns:
The list of prepared elements.
 
arrow_up
 
 

getSpecificationList

public List getSpecificationList(String additionalSpecification )

Returns a list of the specifications for the related classifier. An additional specification can be added as parameter.
Returns:
The specifications as a list of interface type names.
 
arrow_up
 
 

getSpecificationString

public String getSpecificationString()

Returns the specifications for the related classifier as a string. The individual entries are separated by colons. The string can be used directly for the code generation.
Returns:
The specifications as colon-separated string.
 
arrow_up
 
 

getSpecifications

public String getSpecifications()

Returns the specifications for the related classifier as a string. The individual entries are separated by colons. The string can be used directly for the code generation.
Returns:
The specifications as colon-separated string.
 
arrow_up
 
 

getStateNames

public List getStateNames()

Returns the list of names of the states defined for the related classifier.
Returns:
The list of names of the known states for the related classifier.
 
arrow_up
 
 

getStates

public List getStates()

Returns the list of states defined for the related classifier. The states have to be modelled in a state diagram for the related classifier.
Returns:
The list of known states for the related classifier.
 
arrow_up
 
 

hasConstructor

public boolean hasConstructor()

Tests, if the related classifier has at least one constructor
Returns:
True, if the related classifier has a constructor, otherwise false
 
arrow_up
 
 

init

public void init( Classifier element , ModelElementPreparator preparator )

Initializes this instance. It will be related to the given model element and handled by the given preparator. The information of the given model element will be prepared here.
Parameters:
element - The model element this instance should be related to.
preparator - The preparator handling this instance.
 
arrow_up
 
 

isAbstract

public boolean isAbstract()

Tests if the related classifier is abstract.
Returns:
True iff the element is abstract.
 
arrow_up
 
 

isInterface

public boolean isInterface()

Tests, if the related classifier is an interface,
Returns:
True, if the element is of type Interface, otherwise false.
 
arrow_up
 
 

isLeaf

public boolean isLeaf()

Tests if the related classifier is a leaf.
Returns:
True iff the element is a leaf.
 
arrow_up
 
 

isStatic

public boolean isStatic()

Tests if the related classifier is static.
Returns:
True iff the element is static.
 
arrow_up
 
 

prepareAttributes

protected void prepareAttributes()

 
arrow_up
 
 

prepareImports

protected Set prepareImports()

Does ...
Returns:
A Set with ...
 
arrow_up
 
 

prepareInnerClassifiers

protected void prepareInnerClassifiers()

 
arrow_up
 
 

prepareOperations

protected void prepareOperations()

 
arrow_up
 
 

prepareOppositeAssociationEnds

protected void prepareOppositeAssociationEnds()

 
arrow_up
 

Created  2003 - 3 - 4

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2001 Gentleware AG, Vogt-Kölln-Str.30, 22527 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.