org.fuin.srcgen4javassist
Class SgField

java.lang.Object
  extended by org.fuin.srcgen4javassist.SgVariable
      extended by org.fuin.srcgen4javassist.SgField

public final class SgField
extends SgVariable

A field of a class.


Constructor Summary
SgField(SgClass owner, java.lang.String modifiers, SgClass type, java.lang.String name, java.lang.String initializer)
          Constructor with modifiers, class and name.
 
Method Summary
 java.lang.String getInitializer()
          Returns the initializer.
 SgClass getOwner()
          Returns the type this field belongs to.
 java.lang.String toString()
          
 
Methods inherited from class org.fuin.srcgen4javassist.SgVariable
addAnnotation, addAnnotations, getAnnotations, getModifiers, getName, getType, hasAnnotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SgField

public SgField(SgClass owner,
               java.lang.String modifiers,
               SgClass type,
               java.lang.String name,
               java.lang.String initializer)
Constructor with modifiers, class and name. Adds the new instance implicitly to the owner.

Parameters:
owner - The type or method the field belongs to.
modifiers - Modifiers (separated by space) - Cannot be null (but empty).
type - Type of the field - Cannot be null.
name - Name of the field - Cannot be null.
initializer - Initializer for the field - Can be null but should normally be set to an empty String instead.
Method Detail

getOwner

public final SgClass getOwner()
Returns the type this field belongs to.

Returns:
Class.

getInitializer

public final java.lang.String getInitializer()
Returns the initializer.

Returns:
Initializer for the field - Maybe null.

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.