de.uni_paderborn.fujaba.codegen
Class CodeGenFunction

java.lang.Object
  extended byde.uni_paderborn.fujaba.codegen.CodeGenFunction
Direct Known Subclasses:
CreateImportsOOFunction, OOGenFunction

public abstract class CodeGenFunction
extends java.lang.Object

Class CodeGenFunction

Version:
$Revision: 1.10 $

Associations

                0..1           0..1
 OOGenFunction --------------------- OOGenStrategyClient
                function     client

                0..1                  0..1
 OOGenFunction ---------------------------- OOGenFunction
                prevFunction     successor
 
Author:
$Author: creckord $

Field Summary
static int IN_ORDER
          No comment provided by developer, please add a comment to improve documentation.
static int NORM
          No comment provided by developer, please add a comment to improve documentation.
static int POST_ORDER
          No comment provided by developer, please add a comment to improve documentation.
static int PRE_ORDER
          No comment provided by developer, please add a comment to improve documentation.
 
Constructor Summary
CodeGenFunction()
          Default Constructor
CodeGenFunction(int mode)
          Constructor for class OOGenFunction
 
Method Summary
 void add(java.util.LinkedList theLinkedList, java.lang.Object theObject)
          No comment provided by developer, please add a comment to improve documentation.
 java.util.LinkedList concat(java.lang.Object a, java.lang.Object b)
          create new LinkedList and append a and b
static CodeGenFunction findNextResponsible(CodeGenFunction function, java.lang.String methodName)
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.Object generate(FElement incr, java.lang.String methodName, java.lang.Object[] param)
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.Object generateCode(ASGElement incr, java.lang.String methodName, java.lang.Object[] param)
          Deprecated. use generateCode(de.uni_paderborn.fujaba.metamodel.FElement, String, Object[]) instead
 java.lang.Object generateCode(FElement incr, java.lang.String methodName, java.lang.Object[] param)
          Generate code for an element.
 java.lang.Object generateCode(FElement incr, java.lang.String methodName, java.lang.Object[] param, java.lang.Object prevResult)
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.Object generateCode(java.lang.String methodName, java.lang.Object[] param)
          No comment provided by developer, please add a comment to improve documentation.
 CodeGenStrategy getClient()
           
 CodeGenStrategy getClientOfChain()
          Get the clientOfChain attribute of the OOGenFunction object
 int getMode()
          Get the value of mode.
 CodeGenFunction getPrevFunction()
           
 CodeGenFunction getSuccessor()
           
abstract  boolean isResponsible(java.lang.String methodName)
          Get the responsible attribute of the OOGenFunction object
 boolean setClient(CodeGenStrategy value)
           
 void setMode(int mode)
          Set the value of mode.
 boolean setPrevFunction(CodeGenFunction value)
           
 boolean setSuccessor(CodeGenFunction value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORM

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

See Also:
Constant Field Values

PRE_ORDER

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

See Also:
Constant Field Values

IN_ORDER

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

See Also:
Constant Field Values

POST_ORDER

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

See Also:
Constant Field Values
Constructor Detail

CodeGenFunction

public CodeGenFunction()
Default Constructor


CodeGenFunction

public CodeGenFunction(int mode)
Constructor for class OOGenFunction

Parameters:
mode - No description provided
Method Detail

getMode

public int getMode()
Get the value of mode.

Returns:
Value of mode.

setMode

public void setMode(int mode)
Set the value of mode.

Parameters:
mode - Value to assign to mode.

setClient

public boolean setClient(CodeGenStrategy value)
Parameters:
value - The new client value
Returns:
No description provided
See Also:
#client

getClient

public CodeGenStrategy getClient()
Returns:
The client value
See Also:
#client

isResponsible

public abstract boolean isResponsible(java.lang.String methodName)
Get the responsible attribute of the OOGenFunction object

Parameters:
methodName - No description provided
Returns:
The responsible value

generateCode

public final java.lang.Object generateCode(java.lang.String methodName,
                                           java.lang.Object[] param)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
methodName - No description provided
param - No description provided
Returns:
No description provided

generateCode

public java.lang.Object generateCode(FElement incr,
                                     java.lang.String methodName,
                                     java.lang.Object[] param)
Generate code for an element. Subclasses must override this method. For backward compatibility this method is not abstract but invokes the old implementation.

Parameters:
incr - No description provided
methodName - No description provided
param - No description provided
Returns:
No description provided

generateCode

public java.lang.Object generateCode(ASGElement incr,
                                     java.lang.String methodName,
                                     java.lang.Object[] param)
Deprecated. use generateCode(de.uni_paderborn.fujaba.metamodel.FElement, String, Object[]) instead

Parameters:
incr -
methodName -
param -
Returns:
No description provided

generateCode

public java.lang.Object generateCode(FElement incr,
                                     java.lang.String methodName,
                                     java.lang.Object[] param,
                                     java.lang.Object prevResult)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
incr - No description provided
methodName - No description provided
param - No description provided
prevResult - No description provided
Returns:
No description provided

findNextResponsible

public static CodeGenFunction findNextResponsible(CodeGenFunction function,
                                                  java.lang.String methodName)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
function - No description provided
methodName - No description provided
Returns:
No description provided

generate

public final java.lang.Object generate(FElement incr,
                                       java.lang.String methodName,
                                       java.lang.Object[] param)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
incr - No description provided
methodName - No description provided
param - No description provided
Returns:
No description provided

getClientOfChain

public final CodeGenStrategy getClientOfChain()
Get the clientOfChain attribute of the OOGenFunction object

Returns:
The clientOfChain value

concat

public java.util.LinkedList concat(java.lang.Object a,
                                   java.lang.Object b)
create new LinkedList and append a and b

Parameters:
a - an Object value
b - an Object value
Returns:
the new LinkedList value

add

public void add(java.util.LinkedList theLinkedList,
                java.lang.Object theObject)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
theLinkedList - No description provided
theObject - No description provided

setSuccessor

public boolean setSuccessor(CodeGenFunction value)
Parameters:
value - The new successor value
Returns:
No description provided
See Also:
#successor

getSuccessor

public CodeGenFunction getSuccessor()
Returns:
The successor value
See Also:
#successor

setPrevFunction

public boolean setPrevFunction(CodeGenFunction value)
Parameters:
value - The new prevFunction value
Returns:
No description provided
See Also:
#prevFunction

getPrevFunction

public CodeGenFunction getPrevFunction()
Returns:
The prevFunction value
See Also:
#prevFunction

toString

public java.lang.String toString()
Returns:
short string representation of current object