org.eclipse.emf.codegen.merge.java.facade
Interface JField

All Superinterfaces:
JMember, JNode
All Known Implementing Classes:
ASTJField, JDOMJField

public interface JField
extends JMember

Represents a field declaration.

Since:
2.2.0

Method Summary
 java.lang.String getInitializer()
          Returns the initializer expression for this field.
 java.lang.String getType()
          Returns the type name of this field.
 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 interface org.eclipse.emf.codegen.merge.java.facade.JMember
getComment, setComment
 
Methods inherited from interface org.eclipse.emf.codegen.merge.java.facade.JNode
getChildren, getContents, getFlags, getName, getParent, getQualifiedName, setFlags, setName
 

Method Detail

getInitializer

java.lang.String getInitializer()
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 "=".

Returns:
the initializer expression, or null if this field does not have an initializer

setInitializer

void setInitializer(java.lang.String initializer)
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 "=".

Parameters:
initializer - the initializer expression, or null indicating the field does not have an initializer

getType

java.lang.String getType()
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).

Returns:
the name of the type

setType

void setType(java.lang.String typeName)
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".

Parameters:
typeName - the type name

Copyright 2001-2012 IBM Corporation and others.
All Rights Reserved.