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.
Authors:
Thorsten Sturm
See also:
ModelElementPreparator


 Attribute Summary
private List  _secondaryClassifiers
 
private String  generalizationString
 
private List  generalizations
 
private List  innerClassifiers
 
private String  packageString
 
private List  preparedAttributes
 
private Set  preparedImports
 
private List  preparedOperations
 
private List  preparedOppositeAssociationEnds
 
private String  specificationString
 
private List  specifications
 
private List  states
 
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. 
protected String   generateGeneralizationString()
 
protected List   generateGeneralizations()
Produce a list of generalizations. 
protected String   generatePackageString()
 
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. 
public String   getDescription()
Returns the tagged value "documentation". 
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   getSecondaryClassifiers()
 
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. 
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 secondaryClassifier)
 
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()
 
private void   prepareSecondaryClassifier(List secondaryClassifiers)
 
private static String   removeIllegalChars(String name)
 
arrow_up
 

Tagged Values
static false
 

 Attribute Detail

_secondaryClassifiers

private List _secondaryClassifiers

arrow_up


generalizationString

private String generalizationString

arrow_up


generalizations

private List generalizations

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


preparedOperations

private List preparedOperations

arrow_up


preparedOppositeAssociationEnds

private List preparedOppositeAssociationEnds

arrow_up


specificationString

private String specificationString

arrow_up


specifications

private List specifications

arrow_up


states

private List states

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


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


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


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


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


getSecondaryClassifiers

public List getSecondaryClassifiers()

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


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 secondaryClassifier)

Parameters:
element -
preparator -
secondaryClassifier -
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.
Since:
1.4
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


prepareSecondaryClassifier

private void prepareSecondaryClassifier(List secondaryClassifiers)

Parameters:
secondaryClassifiers -
arrow_up


removeIllegalChars

private static String removeIllegalChars(String name)

Parameters:
name -
Returns:
arrow_up
Created  2004 - 10 - 21

    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.