org.eclipse.emf.codegen.merge.java.facade.ast
Class ASTJField

java.lang.Object
  extended byorg.eclipse.emf.codegen.merge.java.facade.AbstractJNode
      extended byorg.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode
          extended byorg.eclipse.emf.codegen.merge.java.facade.ast.ASTJMember
              extended byorg.eclipse.emf.codegen.merge.java.facade.ast.ASTJField
All Implemented Interfaces:
JField, JMember, JNode

public class ASTJField
extends ASTJMember
implements JField

Since:
2.2.0

Field Summary
protected static Pattern CLEAR_INITIALIZER_MULTI_LINE
           
 
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
EMPTY_STRING_ARRAY, facadeHelper, qualifiedName, wrappedObject
 
Constructor Summary
ASTJField(org.eclipse.jdt.core.dom.FieldDeclaration fieldDeclaration)
           
 
Method Summary
protected  org.eclipse.jdt.core.dom.FieldDeclaration getASTFieldDeclaration()
           
 String getInitializer()
          Returns the initializer expression for this field.
protected  String getInitializerFromAST()
           
 String getName()
          Returns the name of this node.
 String getType()
          Returns the type name of this field.
 void setInitializer(String initializer)
          Sets the initializer expression for this field.
 void setType(String typeName)
          Sets the type name of this field.
 
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJMember
getASTBodyDeclaration, getComment, getFlags, setComment
 
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode
getASTNode, getChildren, getContents, getContents, getParent, setFlags, toString
 
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
computeQualifiedName, computeQualifiedName, computeQualifiedName, computeQualifiedName, dispose, getFacadeHelper, getName, getQualifiedName, getWrappedObject, setFacadeHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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, getParent, getQualifiedName, setFlags
 

Field Detail

CLEAR_INITIALIZER_MULTI_LINE

protected static final Pattern CLEAR_INITIALIZER_MULTI_LINE
Constructor Detail

ASTJField

public ASTJField(org.eclipse.jdt.core.dom.FieldDeclaration fieldDeclaration)
Method Detail

getASTFieldDeclaration

protected org.eclipse.jdt.core.dom.FieldDeclaration getASTFieldDeclaration()

getName

public String getName()
Description copied from interface: JNode
Returns the name of this node.

Specified by:
getName in interface JNode
Returns:
the name, or null if it has no name

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

getInitializerFromAST

protected String getInitializerFromAST()

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

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