org.extendj.ast
node type SingleStaticImportDecl

General Info

Production
SingleStaticImportDecl : StaticImportDecl ::= <ID:String>;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by org.extendj.ast.ASTNode<ASTNode>
          extended by org.extendj.ast.ImportDecl
              extended by org.extendj.ast.StaticImportDecl
                  extended by org.extendj.ast.SingleStaticImportDecl
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>, org.jastadd.util.PrettyPrintable

Description

7.5.3 A single-static-import declaration imports all accessible (ยง6.6) static members with a given simple name from a type. This makes these static members available under their simple name in the class and interface declarations of the compilation unit in which the single-static import declaration appears.
Source
Declared in /home/jesper/git/extendj/java5/grammar/StaticImports.ast at line 12

Member Filters

API level:

Aspect:

Constructors

public SingleStaticImportDecl()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public SingleStaticImportDecl(Access p0,
                              java.lang.String p1)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 13
public SingleStaticImportDecl(Access p0,
                              beaver.Symbol p1)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 17

Attributes

@ASTNodeAnnotation.Attribute
syn org.extendj.ast.SimpleSet importedTypes()
For a single-import declaration this will return a SimpleSet containing the TypeDecl for the imported type. For dynamic import declarations this returns the empty set.
Overrides:importedTypes in class ImportDecl
Returns:
TypeDecl of imported type wrapped in SimpleSet
Source
Declared in /home/jesper/git/extendj/java4/frontend/LookupType.jrag at line 437
Aspect
TypeScopePropagation
@ASTNodeAnnotation.Attribute
syn org.extendj.ast.SimpleSet importedFields(java.lang.String name)
Overrides:importedFields in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/StaticImports.jrag at line 55
Aspect
StaticImports
@ASTNodeAnnotation.Attribute
syn java.util.Collection importedMethods(java.lang.String name)
Overrides:importedMethods in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/StaticImports.jrag at line 75
Aspect
StaticImports
Specified by:type in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/StaticImports.jrag at line 95
Aspect
StaticImports
@ASTNodeAnnotation.Attribute
syn java.lang.String name()
Source
Declared in /home/jesper/git/extendj/java5/frontend/StaticImports.jrag at line 167
Aspect
StaticImports

Methods

public void prettyPrint(org.jastadd.util.PrettyPrinter out)
Specified by:prettyPrint in interface org.jastadd.util.PrettyPrintableOverrides:prettyPrint in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java5/frontend/PrettyPrint.jadd at line 385
Aspect
Java5PrettyPrint
public void typeCheck()
The TypeName must be the canonical name of a class or interface type
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java5/frontend/StaticImports.jrag at line 105
Aspect
StaticImports
public void nameCheck()
Check for single static import errors.
Overrides:nameCheck in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java5/frontend/StaticImports.jrag at line 156
Aspect
StaticImports
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/ASTNode at line 10
protected int numChildren()
Overrides:numChildren in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/ASTNode at line 24
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/ASTNode at line 30
public void flushAttrCache()
Overrides:flushAttrCache in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/ASTNode at line 36
public void flushCollectionCache()
Overrides:flushCollectionCache in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/ASTNode at line 45
public void flushRewriteCache()
Overrides:flushRewriteCache in class StaticImportDecl
Source
Declared in /home/jesper/git/extendj/ASTNode at line 51
public SingleStaticImportDecl clone()
                             throws java.lang.CloneNotSupportedException
Overrides:clone in class StaticImportDecl
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 57
Overrides:copy in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 64
@Deprecated
public SingleStaticImportDecl fullCopy()
Deprecated. Please use treeCopy or treeCopyNoTransform instead

Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.

Specified by:fullCopy in class StaticImportDecl
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 83
public SingleStaticImportDecl treeCopyNoTransform()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Specified by:treeCopyNoTransform in class StaticImportDecl
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 93
public SingleStaticImportDecl treeCopy()
Create a deep copy of the AST subtree at this node. The subtree of this node is traversed to trigger rewrites before copy. The copy is dangling, i.e. has no parent.
Specified by:treeCopy in class StaticImportDecl
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 113
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 120
public void setAccess(Access node)
Replaces the Access child.
Overrides:setAccess in class StaticImportDecl
Parameters:
node - The new node to replace the Access child.
Retrieves the Access child.
Overrides:getAccess in class StaticImportDecl
Returns:
The current node used as the Access child.
Retrieves the Access child.

This method does not invoke AST transformations.

Overrides:getAccessNoTransform in class StaticImportDecl
Returns:
The current node used as the Access child.
public void setID(java.lang.String value)
Replaces the lexeme ID.
Parameters:
value - The new value for the lexeme ID.
public void setID(beaver.Symbol symbol)
JastAdd-internal setter for lexeme ID using the Beaver parser.
Parameters:
symbol - Symbol containing the new value for the lexeme ID
@ASTNodeAnnotation.Token(name="ID")
public java.lang.String getID()
Retrieves the value for the lexeme ID.
Returns:
The value for the lexeme ID.
public org.extendj.ast.NameType Define_nameType(ASTNode caller,
                                                ASTNode child)
Overrides:Define_nameType in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag at line 36
protected boolean canDefine_nameType(ASTNode caller,
                                     ASTNode child)
Overrides:rewriteTo in class StaticImportDecl

Fields

protected java.lang.String tokenString_ID
public int IDstart
public int IDend
protected boolean importedTypes_computed
protected org.extendj.ast.SimpleSet importedTypes_value
protected java.util.Map importedFields_String_values
protected java.util.Map importedMethods_String_values

Inherited Members

Attributes inherited from org.extendj.ast.StaticImportDecl

Attributes inherited from org.extendj.ast.ImportDecl

Attributes inherited from org.extendj.ast.ASTNode

Methods inherited from class org.extendj.ast.ImportDecl

Methods inherited from class org.extendj.ast.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Fields inherited from org.extendj.ast.StaticImportDecl

Fields inherited from org.extendj.ast.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value