de.dhbwstuttgart.syntaxtree

## Class Constant

- java.lang.Object
- - de.dhbwstuttgart.syntaxtree.SyntaxTreeNode
  - - de.dhbwstuttgart.syntaxtree.GTVDeclarationContext
    - - de.dhbwstuttgart.syntaxtree.Field
      - - de.dhbwstuttgart.syntaxtree.Method
        - - de.dhbwstuttgart.syntaxtree.Constant

All Implemented Interfaces:
  IItemWithOffset, Generic, GenericTypeInsertable, Typeable, TypeInsertable

    public class Constant
    extends Method

Enthaelt die Eigenschaften einer Konstante (Name, Typ, Modifier, Wert)

Author:
  SCJU

### Field Summary

Fields
`protected Expr` `exp`
`protected Modifiers` `mod`
`protected java.lang.String` `name`
`protected Type` `typ`

### Fields inherited from class de.dhbwstuttgart.syntaxtree.Method

`inferencelog, parameterlist, parserlog`

### Fields inherited from class de.dhbwstuttgart.syntaxtree.Field

`declid`

### Fields inherited from class de.dhbwstuttgart.syntaxtree.SyntaxTreeNode

`parent`

### Constructor Summary

Constructors
Constructor and Description
`Constant(java.lang.String name, Modifiers mod)` Deprecated.

### Method Summary

All Methods Instance Methods Concrete Methods
`TypeAssumptions` `createTypeAssumptions(Class classmember)` Liefert die MethodAssumption zu dieser Methode
`java.lang.String` `getIdentifier()`
`int` `getLineNumber()`
`Modifiers` `getModifiers()`
`int` `getOffset()`
`Type` `getType()` Gibt den Typ der Konstantendefinition zurueck.
`int` `getTypeLineNumber()` Author: Jrg Buerle
`JavaClassName` `getTypeName()`
`Expr` `getValue()` Gibt den Wert der Konstantendefinition zurueck.
`JavaCodeResult` `printJavaCode(ResultSet resultSet)`
`void` `setModifiers(Modifiers modifiers)`
`void` `setName(java.lang.String name)`
`void` `setType(Type typ)` Legt den Typ der Konstantendefinition fest
`void` `setValue(Expr exp)` Legt den Wert der Konstantendefinition fest.

### Methods inherited from class de.dhbwstuttgart.syntaxtree.Method

`createEmptyMethod, equals, get_Block, get_ExceptionList, get_Method_Name, get_Type_Paralist, getChildren, getOverloadedID, getParameterCount, getParameterList, getTypeInformation, getVariableLength, isAbstract, parserPostProcessing, set_Block, set_ExceptionList, set_Method_Name, set_Modifiers, setAbstract, setLineNumber, setOffset, setOverloadedID, setParameterList, toString, TYPE, wandleRefTypeAttributes2GenericAttributes`

### Methods inherited from class de.dhbwstuttgart.syntaxtree.Field

`createTypeInsertPoint, get_Name, getDeclIdMenge, getDescription, getGenericDeclarationList, getGenericParameter, getGenericVarDeclarationOffset, getGenericVarDeclarationString, isClass, isPublic, set_DeclId, setDeclIdMenge, setGenericParameter`

### Methods inherited from class de.dhbwstuttgart.syntaxtree.GTVDeclarationContext

`getGTVDeclarationContext`

### Methods inherited from class de.dhbwstuttgart.syntaxtree.SyntaxTreeNode

`addTypeInsertPoints, getMatchingParentNode, getParent, getParentClass, seesType`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface de.dhbwstuttgart.typeinference.TypeInsertable

`createTypeInsertPoint`

### Field Detail

#### name

    protected java.lang.String name

#### mod

    protected Modifiers mod

#### exp

    protected Expr exp

#### typ

    protected Type typ

### Constructor Detail

#### Constant

    @Deprecated
    public Constant(java.lang.String name,
                                Modifiers mod)

Deprecated.

### Method Detail

#### getValue

    public Expr getValue()

Gibt den Wert der Konstantendefinition zurueck.

#### setValue

    public void setValue(Expr exp)

Legt den Wert der Konstantendefinition fest.

#### getType

    public Type getType()

Gibt den Typ der Konstantendefinition zurueck.

Specified by:
  `getType` in interface `Typeable`
Overrides:
  `getType` in class `Method`

#### setType

    public void setType(Type typ)

Legt den Typ der Konstantendefinition fest

Specified by:
  `setType` in interface `Typeable`
Overrides:
  `setType` in class `Method`
Parameters:
  `typ` - Der Typ der Typable-Expression/Statement

#### getTypeName

    public JavaClassName getTypeName()

Overrides:
  `getTypeName` in class `Method`

#### getIdentifier

    public java.lang.String getIdentifier()

Specified by:
  `getIdentifier` in interface `TypeInsertable`
Overrides:
  `getIdentifier` in class `Field`

#### setName

    public void setName(java.lang.String name)

#### getModifiers

    public Modifiers getModifiers()

#### setModifiers

    public void setModifiers(Modifiers modifiers)

#### getOffset

    public int getOffset()

Specified by:
  `getOffset` in interface `IItemWithOffset`
Specified by:
  `getOffset` in interface `TypeInsertable`
Overrides:
  `getOffset` in class `Method`

#### getLineNumber

    public int getLineNumber()

Overrides:
  `getLineNumber` in class `Method`

#### printJavaCode

    public JavaCodeResult printJavaCode(ResultSet resultSet)

Overrides:
  `printJavaCode` in class `Method`

#### createTypeAssumptions

    public TypeAssumptions createTypeAssumptions(Class classmember)

Description copied from class: `Method`
Liefert die MethodAssumption zu dieser Methode

Overrides:
  `createTypeAssumptions` in class `Method`
Returns:

#### getTypeLineNumber

    public int getTypeLineNumber()

Description copied from class: `Method`
Author: Jrg Buerle

Overrides:
  `getTypeLineNumber` in class `Method`
Returns: