org.eclipse.emf.codegen.merge.java.facade.jdom
Class JDOMJField
java.lang.Object
org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
org.eclipse.emf.codegen.merge.java.facade.jdom.JDOMJNode
org.eclipse.emf.codegen.merge.java.facade.jdom.JDOMJMember
org.eclipse.emf.codegen.merge.java.facade.jdom.JDOMJField
- All Implemented Interfaces:
- JField, JMember, JNode
public class JDOMJField
- extends JDOMJMember
- implements JField
- Since:
- 2.2.0
Constructor Summary |
JDOMJField(org.eclipse.jdt.core.jdom.IDOMField field)
|
Method Summary |
java.lang.String |
getInitializer()
Returns the initializer expression for this field. |
java.lang.String |
getType()
Returns the type name of this field. |
protected org.eclipse.jdt.core.jdom.IDOMField |
getWrappedObject()
|
void |
setInitializer(java.lang.String initializer)
Sets the initializer expression for this field. |
void |
setType(java.lang.String typeName)
Sets the type name of this field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDOMJField
public JDOMJField(org.eclipse.jdt.core.jdom.IDOMField field)
getWrappedObject
protected org.eclipse.jdt.core.jdom.IDOMField getWrappedObject()
- Overrides:
getWrappedObject
in class JDOMJMember
getInitializer
public java.lang.String getInitializer()
- Description copied from interface:
JField
- Returns the initializer expression for this field.
The syntax for an initializer corresponds to VariableInitializer (JLS2 8.3).
Note: The expression does not include a "=
".
- Specified by:
getInitializer
in interface JField
- Returns:
- the initializer expression, or
null
if this field does
not have an initializer
setInitializer
public void setInitializer(java.lang.String initializer)
- Description copied from interface:
JField
- Sets the initializer expression for this field.
The syntax for an initializer corresponds to VariableInitializer (JLS2 8.3).
Note: The expression does not include a "=
".
- Specified by:
setInitializer
in interface JField
- Parameters:
initializer
- the initializer expression, or null
indicating
the field does not have an initializer
getType
public java.lang.String getType()
- Description copied from interface:
JField
- Returns the type name of this field. The syntax for a type name of a field
corresponds to Type in Field Declaration (JLS2 8.3).
- Specified by:
getType
in interface JField
- Returns:
- the name of the type
setType
public void setType(java.lang.String typeName)
- Description copied from interface:
JField
- Sets the type name of this field. The syntax for a type name of a field
corresponds to Type in Field Declaration (JLS2 8.3). Type names must be
specified as they should appear in source code. For example:
"String"
, "int[]"
, or "java.io.File"
.
- Specified by:
setType
in interface JField
- Parameters:
typeName
- the type name