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)
|
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)
getIDOMField
protected org.eclipse.jdt.core.jdom.IDOMField getIDOMField()
getInitializer
public 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(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 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(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