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

com.gentleware.poseidon.generator.PreparedElement
    inheritcom.gentleware.poseidon.uml.generator.PreparedModelElement
        inheritcom.gentleware.poseidon.uml.generator.PreparedClassifier
All known Subclassifier:
PreparedAssociationClass


public class PreparedClassifier


This class contains the prepared information for an classifier. The information can directly be used in the code generation.
See also:
ModelElementPreparator


 Attribute Summary
private List  _containedPreparedElements
 
private List  _fileHeaderComments
 
private String  _generalizationString
 
private List  _innerClassifiers
 
private String  _packageString
 
private List  _preparedAttributes
 
private Set  _preparedImports
 
private List  _preparedInnerClassifiers
 
private List  _preparedOperations
 
private List  _preparedOppositeAssociationEnds
 
private List  _preparedSecondaryClassifiers
 
private List  _secondaryClassifiers
 
private List  _sourceFileComments
 
private String  _specificationString
 
private List  _specifications
 
private List  _states
 
private List  _topLevelPreparedElements
 
arrow_up
 

 Association Summary
private Uml1SmAccessory  _accessory
 
private ImportedLineNumberComparator  _importedLineNumberComparator
 
arrow_up
 

 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, or if an element that is an outer class has private or protected visibility. 
private void   generateFileComments()
Returns a list of all source code comments that are located before the package statement. 
protected String   generateGeneralizationString()
 
protected List   generateGeneralizations()
Produce a list of generalizations. 
protected String   generatePackageString()
 
protected String   generatePackageString(boolean replaceIllegal)
 
protected String   generateSpecificationString()
 
protected String   generateSpecificationString(String additionalSpec)
 
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. 
private Classifier   getClassifier()
 
public List   getContainedPreparedElements()
 
public String   getDescription()
Returns the tagged value "documentation". 
public List   getFileHeaderComments()
Returns a list of all comments located before the package statement. 
public String   getGeneralizationString()
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   getPreparedSecondaryClassifiers()
 
public String   getShortNameAsString()
 
public List   getSpecificationList(String additionalSpecification, Namespace namespace)
Returns a list of the specifications for the related classifier. 
public List   getSpecificationList(String additionalSpecification)
 
public String   getSpecificationString()
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 List   getTopLevelPreparedElements()
 
private String   getUpperCaseBeginStateName(StateVertex state)
 
public boolean   hasConstructor()
Tests, if the related classifier has at least one constructor  
public void   init(Classifier element, ModelElementPreparator preparator, List secondaryClassifiers)
 
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()
 
private void   prepareContainedElements()
 
protected Set   prepareImports()
Does ... 
protected void   prepareInnerClassifiers()
 
protected void   prepareOperations()
 
protected void   prepareOppositeAssociationEnds()
 
private void   prepareSecondaryClassifier()
 
private void   prepareTopLevelElements()
 
private static String   removeIllegalChars(String name)
 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 33
gentleware-imported-package-statement-line-number 6
 

 Attribute Detail

_containedPreparedElements

private List _containedPreparedElements

arrow_up


_fileHeaderComments

private List _fileHeaderComments

arrow_up


_generalizationString

private String _generalizationString

arrow_up


_innerClassifiers

private List _innerClassifiers

arrow_up


_packageString

private String _packageString

arrow_up


_preparedAttributes

private List _preparedAttributes

arrow_up


_preparedImports

private Set _preparedImports

arrow_up


_preparedInnerClassifiers

private List _preparedInnerClassifiers

arrow_up


_preparedOperations

private List _preparedOperations

arrow_up


_preparedOppositeAssociationEnds

private List _preparedOppositeAssociationEnds

arrow_up


_preparedSecondaryClassifiers

private List _preparedSecondaryClassifiers

arrow_up


_secondaryClassifiers

private List _secondaryClassifiers

arrow_up


_sourceFileComments

private List _sourceFileComments

arrow_up


_specificationString

private String _specificationString

arrow_up


_specifications

private List _specifications

arrow_up


_states

private List _states

arrow_up


_topLevelPreparedElements

private List _topLevelPreparedElements

arrow_up
 Association Detail

_accessory

private Uml1SmAccessory _accessory

arrow_up


_importedLineNumberComparator

private ImportedLineNumberComparator _importedLineNumberComparator

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:
error-message if something is wrong with the generalization
arrow_up


checkImports

protected String checkImports()

Returns:
arrow_up


checkPackage

protected String checkPackage()

Returns:
arrow_up


checkSpecifications

protected String checkSpecifications()

Returns:
arrow_up


checkVisibility

public String checkVisibility()


Tests whether the illegal visibilities protected or private of inner classes in interfaces are set, or if an element that is an outer class has private or protected visibility.  
Returns:
arrow_up


generateFileComments

private void generateFileComments()


Returns a list of all source code comments that are located before the package statement.  
arrow_up


generateGeneralizationString

protected String generateGeneralizationString()

Returns:
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()

Returns:
arrow_up


generatePackageString

protected String generatePackageString(boolean replaceIllegal)

Parameters:
replaceIllegal -
Returns:
arrow_up


generateSpecificationString

protected String generateSpecificationString()

Returns:
arrow_up


generateSpecificationString

protected String generateSpecificationString(String additionalSpec)

Parameters:
additionalSpec -
Returns:
arrow_up


generateSpecifications

protected List generateSpecifications()

Returns:
arrow_up


generateStates

protected List generateStates()

Returns:
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


getClassifier

private Classifier getClassifier()

Returns:
arrow_up


getContainedPreparedElements

public List getContainedPreparedElements()

Returns:
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


getFileHeaderComments

public List getFileHeaderComments()


Returns a list of all comments located before the package statement.  
Returns:
list of comments
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


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.
postfix -
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 "".
Since:
1.4
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


getPreparedSecondaryClassifiers

public List getPreparedSecondaryClassifiers()

Returns:
arrow_up


getShortNameAsString

public String getShortNameAsString()

Returns:
arrow_up


getSpecificationList

public List getSpecificationList(String additionalSpecification, Namespace namespace)


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


getSpecificationList

public List getSpecificationList(String additionalSpecification)

Parameters:
additionalSpecification -
Returns:
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


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


getTopLevelPreparedElements

public List getTopLevelPreparedElements()

Returns:
arrow_up


getUpperCaseBeginStateName

private String getUpperCaseBeginStateName(StateVertex state)

Parameters:
state -
Returns:
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, List secondaryClassifiers)

Parameters:
element -
preparator -
secondaryClassifiers -
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. Only inner classifiers are regarded.  
Returns:
True iff the element is static and it's an inner classifier
Since:
1.4
arrow_up


prepareAttributes

protected void prepareAttributes()

arrow_up


prepareContainedElements

private void prepareContainedElements()

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


prepareSecondaryClassifier

private void prepareSecondaryClassifier()

arrow_up


prepareTopLevelElements

private void prepareTopLevelElements()

arrow_up


removeIllegalChars

private static String removeIllegalChars(String name)

Parameters:
name -
Returns:
arrow_up
Created  2004 - 12 - 1

    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 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

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