de.mguennewig.pobjects.metadata
Class Declaration

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.Declaration
Direct Known Subclasses:
CommandDecl, FormDecl, TableExpr, TypeDecl

public abstract class Declaration
extends java.lang.Object

Abstract base class for all declarations.

Author:
Michael Günnewig

Field Summary
static int ARGUMENT_CONSTRUCTOR
           
static int CLASS_NAME
           
static int DESCRIPTOR
           
static int GENERATED_CLASS_NAME
           
static int POINTER_TYPE
           
static int SQL_ARG_COLON
           
static int SQL_ARG_DOLLAR
           
static int SQL_ARG_NONE
           
static int SQL_ARG_QUESTION_MARK
           
 
Constructor Summary
Declaration(java.lang.String name)
          Creates a new declaration.
 
Method Summary
 Description getDescription()
           
 Module getModule()
          Returns the module in which the declaration occurs.
 java.lang.String getName()
          Returns the name of the declaration.
abstract  java.lang.String name(int variant)
          Returns different names depending on variant for the code generator.
 void setDescription(Description descr)
           
 void setModule(Module module)
          Sets the owning module of this declaration.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DESCRIPTOR

public static final int DESCRIPTOR
See Also:
Constant Field Values

POINTER_TYPE

public static final int POINTER_TYPE
See Also:
Constant Field Values

CLASS_NAME

public static final int CLASS_NAME
See Also:
Constant Field Values

GENERATED_CLASS_NAME

public static final int GENERATED_CLASS_NAME
See Also:
Constant Field Values

ARGUMENT_CONSTRUCTOR

public static final int ARGUMENT_CONSTRUCTOR
See Also:
Constant Field Values

SQL_ARG_NONE

public static final int SQL_ARG_NONE
See Also:
Constant Field Values

SQL_ARG_DOLLAR

public static final int SQL_ARG_DOLLAR
See Also:
Constant Field Values

SQL_ARG_COLON

public static final int SQL_ARG_COLON
See Also:
Constant Field Values

SQL_ARG_QUESTION_MARK

public static final int SQL_ARG_QUESTION_MARK
See Also:
Constant Field Values
Constructor Detail

Declaration

public Declaration(java.lang.String name)
Creates a new declaration.

Throws:
java.lang.IllegalArgumentException - if name is null.
Method Detail

getName

public final java.lang.String getName()
Returns the name of the declaration. By convention, it begins with an upper-case letter and contains only letters and digits (no underscore).


getModule

public final Module getModule()
Returns the module in which the declaration occurs.


setModule

public void setModule(Module module)
Sets the owning module of this declaration.


getDescription

public final Description getDescription()

setDescription

public final void setDescription(Description descr)

name

public abstract java.lang.String name(int variant)
Returns different names depending on variant for the code generator.

Throws:
java.lang.IllegalArgumentException - if variant is unknown.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object