AST
node type DiamondAccess

General Info

Production
DiamondAccess : Access ::= TypeAccess:Access;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Expr
              extended by AST.Access
                  extended by AST.DiamondAccess
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Type access for a generic class with an empty type parameter list.
Source
Declared in Java7Frontend/TypeInference.ast at line 4

Member Filters

API level:

Aspect:

Constructors

public DiamondAccess()
 
public DiamondAccess(Access p0)
 

Attributes

syn TypeDecl type()
If this DiamondAccess node constitutes a legal use of the diamond operator, the inferred generic type for the enclosing class instance expression is returned.
Overrides:type in class Access
Source
Declared in Java7Frontend/TypeInference.jrag at line 39
Aspect
TypeInference
syn boolean isDiamond()
Overrides:isDiamond in class Access
Source
Declared in Java7Frontend/TypeInference.jrag at line 65
Aspect
TypeInference
syn java.util.List<TypeDecl> typeArguments(MethodDecl decl)
Type inference for placeholder methods.
Source
Declared in Java7Frontend/TypeInference.jrag at line 267
Aspect
TypeInference
Source
Declared in Java7Frontend/TypeInference.jrag at line 68
Aspect
TypeInference
Source
Declared in Java7Frontend/TypeInference.jrag at line 262
Aspect
TypeInference
inh boolean isAnonymousDecl()
Returns:
true if this access is part of an anonymous class declaration
Source
Declared in Java7Frontend/TypeInference.jrag at line 452
Aspect
TypeInference
Returns:
true if the Access is part of a generic constructor invocation with explicit type arguments
Source
Declared in Java7Frontend/TypeInference.jrag at line 468
Aspect
TypeInference

Methods

public void flushCache()
Overrides:flushCache in class Access
public void flushCollectionCache()
Overrides:flushCollectionCache in class Access
public DiamondAccess clone()
                    throws java.lang.CloneNotSupportedException
Overrides:clone in class Access
Throws:
java.lang.CloneNotSupportedException
Overrides:copy in class ASTNode<ASTNode>
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
protected static SimpleSet mostSpecific(SimpleSet maxSpecific,
                                        MethodDecl decl)
Source
Declared in Java7Frontend/TypeInference.jrag at line 72
Aspect
TypeInference
Choose a constructor for the diamond operator using placeholder methods.
Source
Declared in Java7Frontend/TypeInference.jrag at line 91
Aspect
TypeInference
protected java.util.Collection<MethodDecl> potentiallyApplicable(List<PlaceholderMethodDecl> candidates)
Select potentially applicable method declarations from a set of candidates. Type inference is applied to the (potentially) applicable candidates.
Source
Declared in Java7Frontend/TypeInference.jrag at line 224
Aspect
TypeInference
protected boolean potentiallyApplicable(GenericMethodDecl candidate)
Returns:
false if the candidate method is not applicable.
Source
Declared in Java7Frontend/TypeInference.jrag at line 241
Aspect
TypeInference
public java.util.Collection<TypeDecl> computeConstraints(GenericMethodDecl decl)
Diamond type inference.
Source
Declared in Java7Frontend/TypeInference.jrag at line 297
Aspect
TypeInference
protected boolean applicableBySubtyping(ClassInstanceExpr expr,
                                        MethodDecl method)
Returns:
true if the method is applicable by subtyping
Source
Declared in Java7Frontend/TypeInference.jrag at line 344
Aspect
TypeInference
Returns:
true if the method is applicable by method invocation conversion
Source
Declared in Java7Frontend/TypeInference.jrag at line 357
Aspect
TypeInference
protected boolean applicableByVariableArity(ClassInstanceExpr expr,
                                            MethodDecl method)
Returns:
true if the method is applicable by variable arity
Source
Declared in Java7Frontend/TypeInference.jrag at line 371
Aspect
TypeInference
public void typeCheck()
Checks if this diamond access is legal. The diamond access is not legal if it either is part of an inner class declaration, if it is used to access a non-generic type, or if it is part of a call to a generic constructor with explicit type arguments.
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in Java7Frontend/TypeInference.jrag at line 487
Aspect
TypeInference
public void toString(java.lang.StringBuffer sb)
Pretty printing of diamond access.
Overrides:toString in class ASTNode<ASTNode>
Source
Declared in Java7Frontend/TypeInference.jrag at line 505
Aspect
TypeInference
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class Access
protected int numChildren()
Overrides:numChildren in class Access
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Access
public void setTypeAccess(Access node)
Replaces the TypeAccess child.
Parameters:
node - The new node to replace the TypeAccess child.
Retrieves the TypeAccess child.
Returns:
The current node used as the TypeAccess child.
Retrieves the TypeAccess child.

This method does not invoke AST transformations.

Returns:
The current node used as the TypeAccess child.
Overrides:rewriteTo in class Access

Fields

protected boolean type_computed
protected java.util.Map typeArguments_MethodDecl_values

Inherited Members

Attributes inherited from AST.Access

Attributes inherited from AST.Expr

Attributes inherited from AST.ASTNode

Methods inherited from class AST.Access

Methods inherited from class AST.Expr

Methods inherited from class 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 AST.Access

Fields inherited from AST.Expr

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value