jaxx.compiler.java
Class JavaField
java.lang.Object
jaxx.compiler.java.JavaElement
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 declarationtype - the type of the field as it would appear in Java source codename - the field's nameoverride -
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 declarationtype - the type of the field as it would appear in Java source codename - the field's nameoverride - initializer - the initial value of the field, as it would appear in Java source code
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.