de.uni_paderborn.fujaba.gui
Class AssocCodeGenerator

java.lang.Object
  extended byde.uni_paderborn.fujaba.gui.AssocCodeGenerator

public class AssocCodeGenerator
extends java.lang.Object

This class is responsible for the completion and implementation of associations. In future this special class will be replaced by the code generation module.

Version:
$Revision: 1.30 $
Author:
$Author: lowende $

Field Summary
private static int ASSOC_CARD_11
          No comment provided by developer, please add a comment to improve documentation.
private static int ASSOC_CARD_1N
          No comment provided by developer, please add a comment to improve documentation.
private static int ASSOC_CARD_N1
          No comment provided by developer, please add a comment to improve documentation.
private static int ASSOC_CARD_NN
          No comment provided by developer, please add a comment to improve documentation.
private static int ATTR_QUALIFIER
          No comment provided by developer, please add a comment to improve documentation.
private static int FREE_QUALIFIER
          No comment provided by developer, please add a comment to improve documentation.
private static int LAST_ASSOC_TYPE
          No comment provided by developer, please add a comment to improve documentation.
private static int NO_REPAIR_NEEDED
          No comment provided by developer, please add a comment to improve documentation.
private static int QUALIFIED_ASSOC
          No comment provided by developer, please add a comment to improve documentation.
private static int STANDARD_ASSOC
          No comment provided by developer, please add a comment to improve documentation.
private static int SWITCH_ASSOC
          No comment provided by developer, please add a comment to improve documentation.
private static int SWITCH_TO_REFERENCE
          No comment provided by developer, please add a comment to improve documentation.
private static AssocCodeGenerator theInstance
          No comment provided by developer, please add a comment to improve documentation.
 
Constructor Summary
private AssocCodeGenerator()
          Constructor for class AssocCodeGenerator
 
Method Summary
static void addToTemplateBlockNameListeners(TemplateBlockNameListener listener)
          Deprecated. Use UMLClassOOHandler.addToTemplateBlockNameListeners instead
private  long analyzeAssoc(UMLAssoc assoc)
          Clear the old annotation structure and check for which type of assoc we have to generate code.
 void completeAssoc(UMLAssoc assoc)
          Complete the assoc implementation. param assoc The association which will be completed.
static AssocCodeGenerator get()
          No comment provided by developer, please add a comment to improve documentation.
private  int getAssocCard(UMLRole leftRole, UMLRole rightRole)
          Returns the type of the assoc.
static java.lang.String getAssocTemplateName()
          Deprecated. Use UMLClassOOHandler.getAssocTemplateName instead
static java.lang.String getReferenceTemplateName()
          Deprecated. Use UMLClassOOHandler.getReferenceTemplateName instead
static java.lang.String getTemplateBlockName(java.lang.String blockName, UMLClass cls, UMLAttr attr)
          Deprecated. Use UMLClassOOHandler.getTemplateBlockName instead
static void removeFromTemplateBlockNameListeners(TemplateBlockNameListener listener)
          Deprecated. Use UMLClassOOHandler.removeFromTemplateBlockNameListeners instead
protected  void repairAssoc(UMLAssoc assoc, long repairCode)
          No comment provided by developer, please add a comment to improve documentation.
protected  void repairQualifiedAttrAssoc(UMLAssoc assoc, long repairCode)
          Generates new code for a qualified association.
protected  void repairQualifiedFreeAssoc(UMLAssoc assoc, long repairCode)
          Generates new code for a qualified association.
protected  void repairStandardAssoc(UMLAssoc assoc)
          Repairs an assoc without qualifiers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_REPAIR_NEEDED

private static final int NO_REPAIR_NEEDED
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

SWITCH_TO_REFERENCE

private static final int SWITCH_TO_REFERENCE
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

SWITCH_ASSOC

private static final int SWITCH_ASSOC
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

STANDARD_ASSOC

private static final int STANDARD_ASSOC
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

QUALIFIED_ASSOC

private static final int QUALIFIED_ASSOC
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

ATTR_QUALIFIER

private static final int ATTR_QUALIFIER
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

FREE_QUALIFIER

private static final int FREE_QUALIFIER
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

LAST_ASSOC_TYPE

private static final int LAST_ASSOC_TYPE
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

ASSOC_CARD_11

private static final int ASSOC_CARD_11
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

ASSOC_CARD_1N

private static final int ASSOC_CARD_1N
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

ASSOC_CARD_N1

private static final int ASSOC_CARD_N1
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

ASSOC_CARD_NN

private static final int ASSOC_CARD_NN
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

theInstance

private static AssocCodeGenerator theInstance
No comment provided by developer, please add a comment to improve documentation.

Constructor Detail

AssocCodeGenerator

private AssocCodeGenerator()
Constructor for class AssocCodeGenerator

Method Detail

get

public static AssocCodeGenerator get()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

completeAssoc

public void completeAssoc(UMLAssoc assoc)
Complete the assoc implementation. param assoc The association which will be completed.

Parameters:
assoc - No description provided

analyzeAssoc

private long analyzeAssoc(UMLAssoc assoc)
Clear the old annotation structure and check for which type of assoc we have to generate code.

Parameters:
assoc - The assoc to analyze.
Returns:
An error code which identifies the assoc repair action.

repairAssoc

protected void repairAssoc(UMLAssoc assoc,
                           long repairCode)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
assoc - No description provided
repairCode - No description provided

getTemplateBlockName

public static java.lang.String getTemplateBlockName(java.lang.String blockName,
                                                    UMLClass cls,
                                                    UMLAttr attr)
Deprecated. Use UMLClassOOHandler.getTemplateBlockName instead

Get the templateBlockName attribute of the AssocCodeGenerator class

Parameters:
blockName - No description provided
cls - No description provided
attr - No description provided
Returns:
The templateBlockName value

addToTemplateBlockNameListeners

public static void addToTemplateBlockNameListeners(TemplateBlockNameListener listener)
Deprecated. Use UMLClassOOHandler.addToTemplateBlockNameListeners instead

Access method for an one to n association.

Parameters:
listener - The object added.

removeFromTemplateBlockNameListeners

public static void removeFromTemplateBlockNameListeners(TemplateBlockNameListener listener)
Deprecated. Use UMLClassOOHandler.removeFromTemplateBlockNameListeners instead

No comment provided by developer, please add a comment to improve documentation.

Parameters:
listener - No description provided

repairQualifiedAttrAssoc

protected void repairQualifiedAttrAssoc(UMLAssoc assoc,
                                        long repairCode)
Generates new code for a qualified association. The qualifier is an attribute of the class.

Parameters:
repairCode - Flag for additional information on the assoc.
assoc - No description provided

repairQualifiedFreeAssoc

protected void repairQualifiedFreeAssoc(UMLAssoc assoc,
                                        long repairCode)
Generates new code for a qualified association. The qualifier was specified separately and is not an attribute of the class.

Parameters:
repairCode - Flag for additional information on the assoc.
assoc - No description provided

repairStandardAssoc

protected void repairStandardAssoc(UMLAssoc assoc)
Repairs an assoc without qualifiers.

Parameters:
assoc - The association to repair.

getAssocCard

private int getAssocCard(UMLRole leftRole,
                         UMLRole rightRole)
Returns the type of the assoc.

Parameters:
leftRole - Left role of the association.
rightRole - The associated partner role.
Returns:
The assocCard value

getReferenceTemplateName

public static java.lang.String getReferenceTemplateName()
Deprecated. Use UMLClassOOHandler.getReferenceTemplateName instead

Get the referenceTemplateName attribute of the CodeGenFactory object

Returns:
The referenceTemplateName value

getAssocTemplateName

public static java.lang.String getAssocTemplateName()
Deprecated. Use UMLClassOOHandler.getAssocTemplateName instead

Get the assocTemplateName attribute of the CodeGenFactory object

Returns:
The assocTemplateName value