Lombok - v0.10.8

lombok.core
Class TypeResolver

java.lang.Object
  extended by lombok.core.TypeResolver

public class TypeResolver
extends Object

Capable of resolving a simple type name such as 'String' into 'java.lang.String'.

NB: This resolver gives wrong answers when there's a class in the local package with the same name as a class in a star-import, and this importer also can't find inner types from superclasses/interfaces.


Constructor Summary
TypeResolver(String packageString, Collection<String> importStrings)
          Creates a new TypeResolver that can be used to resolve types in a source file with the given package and import statements.
 
Method Summary
 Collection<String> findTypeMatches(LombokNode<?,?,?> context, TypeLibrary library, String typeRef)
          Finds type matches for the stated type reference.
 boolean typeMatches(LombokNode<?,?,?> context, String fqn, String typeRef)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeResolver

public TypeResolver(String packageString,
                    Collection<String> importStrings)
Creates a new TypeResolver that can be used to resolve types in a source file with the given package and import statements.

Method Detail

typeMatches

public boolean typeMatches(LombokNode<?,?,?> context,
                           String fqn,
                           String typeRef)

findTypeMatches

public Collection<String> findTypeMatches(LombokNode<?,?,?> context,
                                          TypeLibrary library,
                                          String typeRef)
Finds type matches for the stated type reference. The provided context is scanned for local type names that shadow type names listed in import statements. If such a shadowing occurs, no matches are returned for any shadowed types, as you would expect.


Lombok - v0.10.8

Copyright © 2009-2011 The Project Lombok Authors, licensed under the MIT licence.