jaxx.compiler.java
Class JavaField

java.lang.Object
  extended by jaxx.compiler.java.JavaElement
      extended by jaxx.compiler.java.JavaField
All Implemented Interfaces:
java.lang.Comparable<JavaField>

public class JavaField
extends JavaElement
implements java.lang.Comparable<JavaField>

Represents a field in a Java source file being generated for output. JavaFields are created and added to a JavaFile, which can then output Java source code.


Constructor Summary
JavaField(int modifiers, java.lang.String type, java.lang.String name, boolean override)
          Constructs a new JavaField.
JavaField(int modifiers, java.lang.String type, java.lang.String name, boolean override, java.lang.String initializer)
          Constructs a new JavaField.
 
Method Summary
 int compareTo(JavaField o)
           
 java.lang.String getInitializer()
           
 java.lang.String getType()
          Returns the field's type, as it would be represented in Java source code.
 boolean isOverride()
           
 void setOverride(boolean override)
           
 
Methods inherited from class jaxx.compiler.java.JavaElement
getModifiers, getModifiersText, getName, setModifiers, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaField

public JavaField(int modifiers,
                 java.lang.String type,
                 java.lang.String name,
                 boolean override)
Constructs a new JavaField. The modifiers parameter is a bit mask of the constants from Modifier, and the type of the field should be represented as it would appear in Java source code.

Parameters:
modifiers - the modifier keywords that should appear as part of the field's declaration
type - the type of the field as it would appear in Java source code
name - the field's name
override -

JavaField

public JavaField(int modifiers,
                 java.lang.String type,
                 java.lang.String name,
                 boolean override,
                 java.lang.String initializer)
Constructs a new JavaField. The modifiers parameter is a bit mask of the constants from java.lang.reflect.Modifier, and the type of the field should be represented as it would appear in Java source code. The initializer is the initial value of the field as it would appear in Java source code, or null to leave it at the default value.

Parameters:
modifiers - the modifier keywords that should appear as part of the field's declaration
type - the type of the field as it would appear in Java source code
name - the field's name
override -
initializer - the initial value of the field, as it would appear in Java source code
Method Detail

getType

public java.lang.String getType()
Returns the field's type, as it would be represented in Java source code.

Returns:
the field's type

isOverride

public boolean isOverride()

setOverride

public void setOverride(boolean override)

getInitializer

public java.lang.String getInitializer()

compareTo

public int compareTo(JavaField o)
Specified by:
compareTo in interface java.lang.Comparable<JavaField>


Copyright © 2008-2009 CodeLutin. All Rights Reserved.