org.extendj.ast
node type TypeVariable

General Info

Production
TypeVariable : ReferenceType ::= Modifiers <ID:String> BodyDecl* TypeBound:Access*;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by org.extendj.ast.ASTNode<ASTNode>
          extended by org.extendj.ast.TypeDecl
              extended by org.extendj.ast.ReferenceType
                  extended by org.extendj.ast.TypeVariable
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>, java.util.Iterator, org.jastadd.util.PrettyPrintable
static class SimpleSet.SimpleSetImpl
           

Description

Source
Declared in /home/jesper/git/extendj/java5/grammar/Generics.ast at line 18

Member Filters

API level:

Aspect:

Constructors

public TypeVariable()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public TypeVariable(Modifiers p0,
                    java.lang.String p1,
                    List<BodyDecl> p2,
                    List<Access> p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 15
public TypeVariable(Modifiers p0,
                    beaver.Symbol p1,
                    List<BodyDecl> p2,
                    List<Access> p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 21

Attributes

Overrides:unboxed in class ReferenceType
Source
Declared in /home/jesper/git/extendj/java5/frontend/AutoBoxing.jrag at line 72
Aspect
AutoBoxing
Source
Declared in /home/jesper/git/extendj/java5/frontend/GLBTypeFactory.jadd at line 33
Aspect
GreatestLowerBoundFactory
@ASTNodeAnnotation.Attribute
syn boolean boundOf(TypeDecl argument,
                                            org.extendj.ast.Parameterization par)
Check if a type is in the bound of this type, given a specific parameterization of this type. See JLS SE7 $4.5
Overrides:boundOf in class TypeDecl
Parameters:
argument - argument type
par - a parameterization
Returns:
true if the argument type is in the bound of this type
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag at line 63
Aspect
GenericBoundCheck
Overrides:boundOfWildcard in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag at line 80
Aspect
GenericBoundCheck
Overrides:boundOfWildcardExtends in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag at line 83
Aspect
GenericBoundCheck
Overrides:boundOfWildcardSuper in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag at line 87
Aspect
GenericBoundCheck
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericTypeVariables.jrag at line 55
Aspect
GenericTypeVariables
@ASTNodeAnnotation.Attribute
syn java.util.Collection<MethodDecl> memberMethods(java.lang.String name)
Overrides:memberMethods in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag at line 317
Aspect
MemberMethods
@ASTNodeAnnotation.Attribute
syn org.extendj.ast.SimpleSet memberFields(java.lang.String name)
Overrides:memberFields in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag at line 435
Aspect
Fields
Overrides:castingConversionTo in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag at line 109
Aspect
TypeConversion
Overrides:isNestedType in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 195
Aspect
Generics
Overrides:erasure in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 422
Aspect
GenericsErasure
@ASTNodeAnnotation.Attribute
syn java.lang.String fullName()
Overrides:fullName in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag at line 80
Aspect
TypeName
Overrides:sameSignature in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 806
Aspect
LookupParTypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 1094
Aspect
LookupParTypeDecl
Overrides:accessibleFrom in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/frontend/AccessControl.jrag at line 68
Aspect
AccessControl
@ASTNodeAnnotation.Attribute
syn java.lang.String typeName()
Overrides:typeName in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag at line 91
Aspect
TypeName
Overrides:isTypeVariable in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsParTypeDecl.jrag at line 96
Aspect
GenericsParTypeDecl
Overrides:supertypeWildcard in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 66
Aspect
GenericsSubtype
Overrides:supertypeWildcardExtends in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 73
Aspect
GenericsSubtype
Overrides:supertypeWildcardSuper in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 81
Aspect
GenericsSubtype
Overrides:supertypeArrayDecl in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 480
Aspect
GenericsSubtype
Overrides:supertypeTypeVariable in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 321
Aspect
GenericsSubtype
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 350
Aspect
GenericsSubtype
Overrides:supertypeClassDecl in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 448
Aspect
GenericsSubtype
Overrides:supertypeInterfaceDecl in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag at line 465
Aspect
GenericsSubtype
Overrides:instanceOf in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag at line 442
Aspect
TypeWideningAndIdentity
A type is reifiable if it either refers to a non-parameterized type, is a raw type, is a parameterized type with only unbound wildcard parameters or is an array type with a reifiable type parameter.
Overrides:isReifiable in class TypeDecl
See Also:
"JLS SE7 §4.7"
Source
Declared in /home/jesper/git/extendj/java5/frontend/ReifiableTypes.jrag at line 39
Aspect
ReifiableTypes
Overrides:typeDescriptor in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag at line 77
Aspect
ConstantPoolNames
Overrides:arrayTypeDescriptor in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java4/backend/CreateBCode.jrag at line 900
Aspect
CreateBCode
For a top-level type the constant pool name of the type is the same as the canonical name but with dots replaced by solidus.

For nested types the constant pool name is based on the enclosing top-level types constant pool name followed by a dollar sign and a unique index and/or the type name.

Overrides:constantPoolName in class TypeDecl
Returns:
constant pool name of this type
Source
Declared in /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag at line 44
Aspect
ConstantPoolNames
Overrides:needsSignatureAttribute in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag at line 345
Aspect
GenericsCodegen
Source
Declared in /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag at line 448
Aspect
GenericsCodegen
Overrides:fieldTypeSignature in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag at line 467
Aspect
GenericsCodegen
Overrides:classTypeSignature in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag at line 476
Aspect
GenericsCodegen
Source
Declared in /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag at line 532
Aspect
GenericsCodegen
Source
Declared in /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag at line 538
Aspect
GenericsCodegen
Overrides:strictSupertypeWildcard in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag at line 68
Aspect
StrictSubtype
Overrides:strictSupertypeWildcardExtends in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag at line 77
Aspect
StrictSubtype
Overrides:strictSupertypeWildcardSuper in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag at line 85
Aspect
StrictSubtype
Overrides:strictSupertypeArrayDecl in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag at line 407
Aspect
StrictSubtype
Overrides:strictSupertypeTypeVariable in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag at line 276
Aspect
StrictSubtype
Overrides:strictSupertypeClassDecl in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag at line 370
Aspect
StrictSubtype
Overrides:strictSupertypeInterfaceDecl in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag at line 390
Aspect
StrictSubtype
Overrides:typeObject in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 1092
Aspect
LookupParTypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 1141
Aspect
LookupParTypeDecl
Source
Declared in /home/jesper/git/extendj/java8/frontend/TypeVariablePositions.jrag at line 29
Aspect
TypeVariablePositions
Source
Declared in /home/jesper/git/extendj/java8/frontend/TypeVariablePositions.jrag at line 30
Aspect
TypeVariablePositions
Source
Declared in /home/jesper/git/extendj/java8/frontend/TypeVariablePositions.jrag at line 32
Aspect
TypeVariablePositions

Methods

public void nameCheck()
Overrides:nameCheck in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericTypeVariables.jrag at line 49
Aspect
GenericTypeVariables
public void typeCheck()
Overrides:typeCheck in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericTypeVariables.jrag at line 86
Aspect
GenricTypeVariablesTypeAnalysis
public Access substitute(org.extendj.ast.Parameterization parTypeDecl)
Overrides:substitute in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 1039
Aspect
LookupParTypeDecl
public Access substituteReturnType(org.extendj.ast.Parameterization parTypeDecl)
Overrides:substituteReturnType in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 1102
Aspect
LookupParTypeDecl
public Access substituteParameterType(org.extendj.ast.Parameterization parTypeDecl)
Overrides:substituteParameterType in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 1142
Aspect
LookupParTypeDecl
Overrides:createQualifiedAccess in class TypeDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Generics.jrag at line 1608
Aspect
NewGenerics
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 280
Aspect
Java5PrettyPrint
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class ReferenceType
Source
Declared in /home/jesper/git/extendj/ASTNode at line 10
protected int numChildren()
Overrides:numChildren in class ReferenceType
Source
Declared in /home/jesper/git/extendj/ASTNode at line 30
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class ReferenceType
Source
Declared in /home/jesper/git/extendj/ASTNode at line 36
public void flushAttrCache()
Overrides:flushAttrCache in class ReferenceType
Source
Declared in /home/jesper/git/extendj/ASTNode at line 42
public void flushCollectionCache()
Overrides:flushCollectionCache in class ReferenceType
Source
Declared in /home/jesper/git/extendj/ASTNode at line 74
public void flushRewriteCache()
Overrides:flushRewriteCache in class ReferenceType
Source
Declared in /home/jesper/git/extendj/ASTNode at line 80
public TypeVariable clone()
                   throws java.lang.CloneNotSupportedException
Overrides:clone in class ReferenceType
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 86
public TypeVariable copy()
Overrides:copy in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 93
@Deprecated
public TypeVariable 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 ReferenceType
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 112
public TypeVariable 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 ReferenceType
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 122
public TypeVariable 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 ReferenceType
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 142
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 149
public void setModifiers(Modifiers node)
Replaces the Modifiers child.
Overrides:setModifiers in class ReferenceType
Parameters:
node - The new node to replace the Modifiers child.
Retrieves the Modifiers child.
Overrides:getModifiers in class ReferenceType
Returns:
The current node used as the Modifiers child.
Retrieves the Modifiers child.

This method does not invoke AST transformations.

Overrides:getModifiersNoTransform in class ReferenceType
Returns:
The current node used as the Modifiers child.
public void setID(java.lang.String value)
Replaces the lexeme ID.
Overrides:setID in class ReferenceType
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.
Overrides:setID in class ReferenceType
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.
Overrides:getID in class ReferenceType
Returns:
The value for the lexeme ID.
public void setBodyDeclList(List<BodyDecl> list)
Replaces the BodyDecl list.
Overrides:setBodyDeclList in class ReferenceType
Parameters:
list - The new list node to be used as the BodyDecl list.
public int getNumBodyDecl()
Retrieves the number of children in the BodyDecl list.
Overrides:getNumBodyDecl in class ReferenceType
Returns:
Number of children in the BodyDecl list.
Retrieves the number of children in the BodyDecl list. Calling this method will not trigger rewrites.
Overrides:getNumBodyDeclNoTransform in class ReferenceType
Returns:
Number of children in the BodyDecl list.
public BodyDecl getBodyDecl(int i)
Retrieves the element at index i in the BodyDecl list.
Overrides:getBodyDecl in class ReferenceType
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the BodyDecl list.
public boolean hasBodyDecl()
Check whether the BodyDecl list has any children.
Overrides:hasBodyDecl in class ReferenceType
Returns:
true if it has at least one child, false otherwise.
public void addBodyDecl(BodyDecl node)
Append an element to the BodyDecl list.
Overrides:addBodyDecl in class ReferenceType
Parameters:
node - The element to append to the BodyDecl list.
public void setBodyDecl(BodyDecl node,
                        int i)
Replaces the BodyDecl list element at index i with the new node node.
Overrides:setBodyDecl in class ReferenceType
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the BodyDecl list.
Overrides:getBodyDeclList in class ReferenceType
Returns:
The node representing the BodyDecl list.
Retrieves the BodyDecl list.

This method does not invoke AST transformations.

Overrides:getBodyDeclListNoTransform in class ReferenceType
Returns:
The node representing the BodyDecl list.
Retrieves the BodyDecl list.
Overrides:getBodyDecls in class ReferenceType
Returns:
The node representing the BodyDecl list.
Retrieves the BodyDecl list.

This method does not invoke AST transformations.

Overrides:getBodyDeclsNoTransform in class ReferenceType
Returns:
The node representing the BodyDecl list.
public void setTypeBoundList(List<Access> list)
Replaces the TypeBound list.
Parameters:
list - The new list node to be used as the TypeBound list.
public int getNumTypeBound()
Retrieves the number of children in the TypeBound list.
Returns:
Number of children in the TypeBound list.
Retrieves the number of children in the TypeBound list. Calling this method will not trigger rewrites.
Returns:
Number of children in the TypeBound list.
public Access getTypeBound(int i)
Retrieves the element at index i in the TypeBound list.
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the TypeBound list.
public boolean hasTypeBound()
Check whether the TypeBound list has any children.
Returns:
true if it has at least one child, false otherwise.
public void addTypeBound(Access node)
Append an element to the TypeBound list.
Parameters:
node - The element to append to the TypeBound list.
public void addTypeBoundNoTransform(Access node)
public void setTypeBound(Access node,
                         int i)
Replaces the TypeBound list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the TypeBound list.
Returns:
The node representing the TypeBound list.
Retrieves the TypeBound list.

This method does not invoke AST transformations.

Returns:
The node representing the TypeBound list.
Retrieves the TypeBound list.
Returns:
The node representing the TypeBound list.
Retrieves the TypeBound list.

This method does not invoke AST transformations.

Returns:
The node representing the TypeBound list.
public org.extendj.ast.NameType Define_nameType(ASTNode caller,
                                                ASTNode child)
Overrides:Define_nameType in class TypeDecl
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 ReferenceType
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public org.extendj.ast.SimpleSet lookupVariable(java.lang.String name)

Fields

protected boolean unboxed_computed
protected boolean toInterface_computed
protected java.util.Map memberFields_String_values
protected java.util.Map castingConversionTo_TypeDecl_values
protected boolean erasure_computed
protected boolean fullName_computed
protected java.lang.String fullName_value
protected boolean lubType_computed
protected boolean usesTypeVariable_computed
protected boolean usesTypeVariable_value
protected java.util.Map accessibleFrom_TypeDecl_values
protected boolean typeName_computed
protected java.lang.String typeName_value
protected java.util.Map sameStructure_TypeDecl_values
protected java.util.Map subtype_TypeDecl_values
protected java.util.Map instanceOf_TypeDecl_values
protected boolean typeDescriptor_computed
protected java.lang.String typeDescriptor_value
protected boolean constantPoolName_computed
protected java.lang.String constantPoolName_value
protected boolean fieldTypeSignature_computed
protected java.lang.String fieldTypeSignature_value
protected boolean classTypeSignature_computed
protected java.lang.String classTypeSignature_value
protected boolean classBound_computed
protected java.lang.String classBound_value
protected boolean interfaceBounds_computed
protected java.lang.String interfaceBounds_value
protected java.util.Map strictSubtype_TypeDecl_values
protected boolean typeVarPosition_computed
protected int typeVarPosition_value
protected boolean genericMethodLevel_computed
protected boolean typeVarInMethod_computed
protected boolean typeVarInMethod_value
public static final org.extendj.ast.SimpleSet emptySet
public static final org.extendj.ast.SimpleSet fullSet

Inherited Members

Attributes inherited from org.extendj.ast.ReferenceType

Attributes inherited from org.extendj.ast.TypeDecl

Attributes inherited from org.extendj.ast.ASTNode

Methods inherited from class org.extendj.ast.ReferenceType

Methods inherited from class org.extendj.ast.TypeDecl

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.ReferenceType

Fields inherited from org.extendj.ast.TypeDecl

Fields inherited from org.extendj.ast.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value