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

java.lang.Object
  extended by org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
      extended by org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode<org.eclipse.jdt.core.dom.ImportDeclaration>
          extended by org.eclipse.emf.codegen.merge.java.facade.ast.ASTJImport
All Implemented Interfaces:
JImport, JNode

public class ASTJImport
extends ASTJNode<org.eclipse.jdt.core.dom.ImportDeclaration>
implements JImport

Wraps ImportDeclaration object.

Since:
2.2.0

Field Summary
 
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode
isCommentedOut, name, rewriter, UNITIALIZED_STRING
 
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
EMPTY_STRING_ARRAY, qualifiedName
 
Constructor Summary
ASTJImport(org.eclipse.jdt.core.dom.ImportDeclaration importDeclaration)
           
 
Method Summary
 int getFlags()
          Returns original flags.
 java.lang.String getName()
          Returns the name of the import ending with ".*" for on demand imports.
 boolean isOnDemand()
          Return true if original import was an "on demand" import.
 void setFlags(int flags)
          Sets FacadeFlags.STATIC flag.
 void setName(java.lang.String name)
          Sets the name of the import to the given name and sets "on demand" property to false.
 
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode
addChild, addValueToListProperty, addValueToListProperty, ancestorInserted, ancestorToBeRemoved, childToBeChanged, combineArrayAndList, commentOut, convertASTNodeListToStringArray, disableTrackAndReplace, dispose, enableTrackAndReplace, getASTNode, getContents, getFacadeHelper, getParent, getRemovedASTNode, getRewriter, getWrappedObject, insert, insertFirst, insertLast, insertSibling, isDisposed, nodeToBeMoved, nodeToBeRemoved, remove, remove, removeNodeFromListProperty, removeTrackAndReplace, setASTNode, setFacadeHelper, setListNodeProperty, setNodeProperty, setNodeProperty, setParent, setRemovedASTNode, setRewriter, setTrackedNodeProperty, setWrappedObject, trackAndReplace
 
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
computeQualifiedName, computeQualifiedName, computeQualifiedName, computeQualifiedName, getChildren, getName, getQualifiedName
 
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.JNode
getChildren, getContents, getParent, getQualifiedName
 

Constructor Detail

ASTJImport

public ASTJImport(org.eclipse.jdt.core.dom.ImportDeclaration importDeclaration)
Parameters:
importDeclaration -
Method Detail

isOnDemand

public boolean isOnDemand()
Return true if original import was an "on demand" import.

Specified by:
isOnDemand in interface JImport
Returns:
true if this in an on-demand import
See Also:
JImport.isOnDemand()

getName

public java.lang.String getName()
Returns the name of the import ending with ".*" for on demand imports.

Specified by:
getName in interface JNode
Returns:
the name, or null if it has no name
See Also:
JNode.getName()

setName

public void setName(java.lang.String name)
Sets the name of the import to the given name and sets "on demand" property to false.

Specified by:
setName in interface JNode
See Also:
JNode.setName(java.lang.String), JNode.getQualifiedName()

getFlags

public int getFlags()
Returns original flags.

For import, only FacadeFlags.STATIC flag is set.

Specified by:
getFlags in interface JNode
Overrides:
getFlags in class AbstractJNode
See Also:
AbstractJNode.getFlags()

setFlags

public void setFlags(int flags)
Sets FacadeFlags.STATIC flag.

Note that getFlags() will not return the new value.

Specified by:
setFlags in interface JNode
Overrides:
setFlags in class ASTJNode<org.eclipse.jdt.core.dom.ImportDeclaration>
Parameters:
flags - the flags
See Also:
ASTJNode.setFlags(int)

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