jltools.ext.jl.ast
Class Import_c
java.lang.Object
|
+--jltools.ext.jl.ast.Node_c
|
+--jltools.ext.jl.ast.Import_c
- All Implemented Interfaces:
- java.lang.Cloneable, Copy, Import, Node, java.io.Serializable
- public class Import_c
- extends Node_c
- implements Import
An Import
is an immutable representation of a Java
import
statement. It consists of the string representing the
item being imported and the kind which is either indicating that a class
is being imported, or that an entire package is being imported.
- See Also:
- Serialized Form
Field Summary |
protected jltools.ext.jl.ast.Kind |
kind
|
protected java.lang.String |
name
|
Constructor Summary |
Import_c(Ext ext,
Position pos,
jltools.ext.jl.ast.Kind kind,
java.lang.String name)
|
Methods inherited from class jltools.ext.jl.ast.Node_c |
buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, dump, enterScope, exceptionCheck_, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, leaveScope, position, position, reconstructTypes_, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck_, typeCheck, typeCheckOverride_, typeCheckOverride, visit, visitChildren, visitList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jltools.ast.Import |
kind |
Methods inherited from interface jltools.ast.Node |
buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, enterScope, exceptionCheck_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, leaveScope, position, position, reconstructTypes_, typeCheck_, typeCheckOverride_, visit, visitChildren |
kind
protected jltools.ext.jl.ast.Kind kind
name
protected java.lang.String name
Import_c
public Import_c(Ext ext,
Position pos,
jltools.ext.jl.ast.Kind kind,
java.lang.String name)
name
public java.lang.String name()
- Get the name of the import.
- Specified by:
name
in interface Import
name
public Import name(java.lang.String name)
- Set the name of the import.
- Specified by:
name
in interface Import
kind
public jltools.ext.jl.ast.Kind kind()
- Get the kind of the import.
- Specified by:
kind
in interface Import
kind
public Import kind(jltools.ext.jl.ast.Kind kind)
- Set the kind of the import.
buildTypes_
public Node buildTypes_(TypeBuilder tb)
throws SemanticException
- Build type objects for the import.
- Specified by:
buildTypes_
in interface Node
- Overrides:
buildTypes_
in class Node_c
toString
public java.lang.String toString()
- Overrides:
toString
in class Node_c
translate_
public void translate_(CodeWriter w,
Translator tr)
- Write the import to an output file.
- Specified by:
translate_
in interface Node
- Overrides:
translate_
in class Node_c
- Following copied from interface:
jltools.ast.Node
- Parameters:
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.