Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

javax.ide.model.java.source
Interface TreeResolver

All Known Subinterfaces:
JavaModel

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.

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
 Declaration getResolvedDeclaration(Tree tree)
          Resolves this tree into a declaration reference.
 TypeD getResolvedType(Tree tree)
          Resolves this tree into a type reference.
 

Method Detail

getResolvedDeclaration

Declaration getResolvedDeclaration(Tree tree)
Resolves this tree into a declaration reference.

Returns:
The resolved declaration this tree refers to, null if unresolvable.
Throws:
java.lang.UnsupportedOperationException - if this tree does not resolve to a declaration. Example: assert.

getResolvedType

TypeD getResolvedType(Tree tree)
Resolves this tree into a type reference.

Returns:
The resolved type this tree refers to, null if unresolvable.
Throws:
java.lang.UnsupportedOperationException - if this tree does not resolve to a type. Example: assert.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.