|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.argouml.uml.generator.Generator2
This class is the abstract super class that defines a code generation framework. It is basically a depth-first traversal of the UML model that generates strings as it goes. This framework should probably be redesigned to separate the traversal logic from the generation logic. See the Visitor design pattern in "Design Patterns", and the Demeter project.
| Field Summary | |
private static Map |
generators
Deprecated. |
static String |
INDENT
Deprecated. Two spaces used for indenting code in classes. |
private static Logger |
LOG
Deprecated. |
private NotationName |
notationName
Deprecated. |
| Fields inherited from interface org.argouml.application.api.Pluggable |
PLUGIN_PREFIX, PLUGIN_TITLE, PLUGIN_VENDOR |
| Fields inherited from interface org.argouml.application.api.ArgoModule |
MODULEFILENAME, MODULEFILENAME_ALTERNATE |
| Constructor Summary | |
Generator2(NotationName nn)
Deprecated. Constructor that sets the name of this notation. |
|
| Method Summary | |
String |
generate(Object o)
Deprecated. Generates code for some modelelement. |
abstract String |
generateAction(Object m)
Deprecated. Generate the String representation for an Action. |
abstract String |
generateAssociation(Object a)
Deprecated. Generate the String representation for an Association. |
abstract String |
generateAssociationEnd(Object ae)
Deprecated. Generate the String representation for an AssociationEnd. |
abstract String |
generateAttribute(Object attr,
boolean documented)
Deprecated. Generate the String representation for an Attribute. |
abstract String |
generateClassifier(Object cls)
Deprecated. Generate the String representation for a Classifier. |
String |
generateClassifierRef(Object cls)
Deprecated. Generate the String representation for a ClassifierRef. |
abstract String |
generateEvent(Object m)
Deprecated. Generate the String representation for an Event. |
String |
generateExpression(Object expr)
Deprecated. Generate the String representation for an Expression. |
abstract String |
generateExtensionPoint(Object op)
Deprecated. Generate the String representation for an ExtensionPoint. |
abstract String |
generateGuard(Object m)
Deprecated. Generate the String representation for a Guard. |
abstract String |
generateMessage(Object m)
Deprecated. Generate the String representation for a Message. |
abstract String |
generateMultiplicity(Object m)
Deprecated. Generate the String representation for an Multiplicity. |
String |
generateName(String n)
Deprecated. Convert a String to a name. |
abstract String |
generateObjectFlowState(Object m)
Deprecated. Generate the String representation for a ObjectFlowState. |
abstract String |
generateOperation(Object op,
boolean documented)
Deprecated. Generate the String representation for an Operation. |
abstract String |
generatePackage(Object p)
Deprecated. Generate the String representation for a Package. |
abstract String |
generateParameter(Object param)
Deprecated. Generate the String representation for a Parameter. |
abstract String |
generateState(Object m)
Deprecated. Generate the String representation for a State. |
String |
generateStereotype(Object st)
Deprecated. Generate the String representation for a Stereotype. |
abstract String |
generateSubmachine(Object m)
Deprecated. Generate the String representation for a Submachine. |
abstract String |
generateTaggedValue(Object s)
Deprecated. Generate the String representation for a TaggedValue. |
abstract String |
generateTransition(Object m)
Deprecated. Generate the String representation for a Transition. |
String |
generateUninterpreted(String un)
Deprecated. Make a string non-null. |
abstract String |
generateVisibility(Object m)
Deprecated. Generate the String representation for a Visibility. |
static String |
getCodePath(Object me)
Deprecated. Gets the path of the code base for a model element. |
static Generator2 |
getGenerator(NotationName n)
Deprecated. Access method that finds the correct generator based on a name. |
Vector |
getModulePopUpActions(Vector v,
Object o)
Deprecated. Calls all modules to let them add to a popup menu. |
NotationName |
getNotation()
Deprecated. |
boolean |
inContext(Object[] o)
Deprecated. A function which allows a plug-in to decide if it is available under a specific context. |
boolean |
initializeModule()
Deprecated. Method called when Argo is loading a module. |
boolean |
isModuleEnabled()
Deprecated. The default for any Generator is to be enabled. |
void |
setModuleEnabled(boolean enabled)
Deprecated. Called to enable or disable a module programmatically. |
boolean |
shutdownModule()
Deprecated. Method called when Argo is unloading a module. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.argouml.notation.NotationProvider2 |
generateActionState, generateAssociationRole, generateStateBody |
| Methods inherited from interface org.argouml.application.api.ArgoModule |
getModuleAuthor, getModuleDescription, getModuleKey, getModuleName, getModuleVersion |
| Field Detail |
private static final Logger LOG
private NotationName notationName
public static final String INDENT
private static Map generators
| Constructor Detail |
public Generator2(NotationName nn)
nn - The NotationName object.| Method Detail |
public static Generator2 getGenerator(NotationName n)
n - The name.
public NotationName getNotation()
getNotation in interface NotationProvider2NotationProvider2.getNotation()public String generate(Object o)
o - the element to be generated
public abstract String generateExtensionPoint(Object op)
NotationProvider2
generateExtensionPoint in interface NotationProvider2op - Object to generate representation for.
NotationProvider2.generateExtensionPoint(Object)
public abstract String generateOperation(Object op,
boolean documented)
NotationProvider2
generateOperation in interface NotationProvider2op - Object to generate representation for.documented - true if documentation shall be generated.
NotationProvider2.generateOperation(Object, boolean)
public abstract String generateAttribute(Object attr,
boolean documented)
NotationProvider2
generateAttribute in interface NotationProvider2attr - Object to generate representation for.documented - true if documentation shall be generated.
NotationProvider2.generateAttribute(Object, boolean)public abstract String generateParameter(Object param)
NotationProvider2
generateParameter in interface NotationProvider2param - Object to generate representation for.
NotationProvider2.generateParameter(Object)public abstract String generatePackage(Object p)
NotationProvider2
generatePackage in interface NotationProvider2p - Object to generate representation for.
NotationProvider2.generatePackage(Object)public abstract String generateClassifier(Object cls)
NotationProvider2
generateClassifier in interface NotationProvider2cls - Object to generate representation for.
NotationProvider2.generateClassifier(Object)public abstract String generateTaggedValue(Object s)
NotationProvider2
generateTaggedValue in interface NotationProvider2s - Object to generate representation for.
NotationProvider2.generateTaggedValue(Object)public abstract String generateAssociation(Object a)
NotationProvider2
generateAssociation in interface NotationProvider2a - Object to generate representation for.
NotationProvider2.generateAssociation(Object)public abstract String generateAssociationEnd(Object ae)
NotationProvider2
generateAssociationEnd in interface NotationProvider2ae - Object to generate representation for.
NotationProvider2.generateAssociationEnd(Object)public abstract String generateMultiplicity(Object m)
NotationProvider2
generateMultiplicity in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateMultiplicity(Object)public abstract String generateObjectFlowState(Object m)
NotationProvider2
generateObjectFlowState in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateObjectFlowState(Object)public abstract String generateState(Object m)
NotationProvider2
generateState in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateState(Object)public abstract String generateSubmachine(Object m)
NotationProvider2
generateSubmachine in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateSubmachine(Object)public abstract String generateTransition(Object m)
NotationProvider2
generateTransition in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateTransition(Object)public abstract String generateAction(Object m)
NotationProvider2
generateAction in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateAction(Object)public abstract String generateGuard(Object m)
NotationProvider2
generateGuard in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateGuard(Object)public abstract String generateMessage(Object m)
NotationProvider2
generateMessage in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateMessage(Object)public abstract String generateEvent(Object m)
NotationProvider2
generateEvent in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateEvent(Object)public abstract String generateVisibility(Object m)
NotationProvider2
generateVisibility in interface NotationProvider2m - Object to generate representation for.
NotationProvider2.generateVisibility(Object)public String generateExpression(Object expr)
NotationProvider2
generateExpression in interface NotationProvider2expr - Object to generate representation for.
NotationProvider2.generateExpression(Object)public String generateName(String n)
NotationProvider2TODO: What is the purpose of this function? Is it really needed?
generateName in interface NotationProvider2n - The String to be converted.
NotationProvider2.generateName(String)public String generateUninterpreted(String un)
What is the purpose of this function? Shouldn't it be private static?
un - The String.
public String generateClassifierRef(Object cls)
NotationProvider2
generateClassifierRef in interface NotationProvider2cls - Object to generate representation for.
NotationProvider2.generateClassifierRef(Object)public String generateStereotype(Object st)
NotationProvider2
generateStereotype in interface NotationProvider2st - Object to generate representation for.
This can also be a Collection with all stereotypes.
NotationProvider2.generateStereotype(Object)
public Vector getModulePopUpActions(Vector v,
Object o)
ArgoModule
getModulePopUpActions in interface ArgoModulev - Vector of actionso - which the actions are valid for
ArgoModule.getModulePopUpActions(
Vector, Object)public boolean shutdownModule()
ArgoModule
shutdownModule in interface ArgoModuleArgoModule.shutdownModule()public boolean initializeModule()
ArgoModule
initializeModule in interface ArgoModuleArgoModule.initializeModule()public void setModuleEnabled(boolean enabled)
ArgoModule
setModuleEnabled in interface ArgoModuleenabled - true to enable module, false to disableArgoModule.setModuleEnabled(boolean)public boolean inContext(Object[] o)
Pluggable
inContext in interface Pluggableo - An identification of the context.
The interpretation of criteria is specific to
the plug-in type, but must be consistent
across that type. The plug-in must want
to be exposed to all contexts.
Pluggable.inContext(Object[])public static String getCodePath(Object me)
If empty or not existing return null.
me - The model element
public boolean isModuleEnabled()
isModuleEnabled in interface ArgoModuleArgoModule.isModuleEnabled()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2005 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |