Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.model.java.source.util
Interface TreeResolver  view TreeResolver download TreeResolver.java


public interface TreeResolver

The TreeResolver provides a facility for resolving type and declaration references on Trees. Methods are provided for resolving individual Tree objects. Other methods are provided for resolving an entire FileT.

The TreeResolver may need to acquire resource(s) as it performs resolution. Callers should be warned that TreeResolver operations may therefore block unless the underlying resource has already been acquired.

TODO: How does a caller acquire said resources? In particular, this is a problem since the resolution does not know ahead of time which compilation units will need to be read to perform a particular operation.

Constructors

There is one special case where a Tree resolves to a valid type and a valid declaration that "seem" to not match, namely NewClassExpressionT. The NewClassExpressionT will be resolved to a type which is the type of the class being created. However, the NewClassExpressionT will also resolve to a constructor declaration which, as you may recall, have no return type.


Method Summary
 javax.ide.model.java.declaration.Declaration getResolvedDeclaration(javax.ide.model.java.source.tree.Tree tree)
          Resolves this tree into a declaration reference.
 java.util.Collection getResolvedDeclarations(javax.ide.model.java.source.tree.FileT file)
          Lists all the declaration references made in this file.
 javax.ide.model.java.declaration.TypeD getResolvedType(javax.ide.model.java.source.tree.Tree tree)
          Resolves this tree into a type reference.
 java.util.Collection getResolvedTypes(javax.ide.model.java.source.tree.FileT file)
          Lists all the type references made in this file.
 

Method Detail

getResolvedDeclaration

public javax.ide.model.java.declaration.Declaration getResolvedDeclaration(javax.ide.model.java.source.tree.Tree tree)
Resolves this tree into a declaration reference.


getResolvedType

public javax.ide.model.java.declaration.TypeD getResolvedType(javax.ide.model.java.source.tree.Tree tree)
Resolves this tree into a type reference.


getResolvedDeclarations

public java.util.Collection getResolvedDeclarations(javax.ide.model.java.source.tree.FileT file)
Lists all the declaration references made in this file.


getResolvedTypes

public java.util.Collection getResolvedTypes(javax.ide.model.java.source.tree.FileT file)
Lists all the type references made in this file.