lombok.core
Class TypeLibrary
java.lang.Object
lombok.core.TypeLibrary
public class TypeLibrary
- extends Object
Library of types, which can be used to look up potential matching types.
For example, if you put 'foo.Spork' and 'bar.Spork' into the library, and then ask for
all compatible types given the type 'Spork', you'll get both of them, but you'll only
get the one if you ask for compatible types given 'foo.Spork'.
Useful to 'guess' if a given annotation AST node matches an annotation handler's target annotation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeLibrary
public TypeLibrary()
addType
public void addType(String fullyQualifiedTypeName)
- Add a type to the library.
- Parameters:
fullyQualifiedTypeName - the FQN type name, such as 'java.lang.String'.
findCompatible
public Collection<String> findCompatible(String typeReference)
- Returns all items in the type library that may be a match to the provided type.
- Parameters:
typeReference - something like 'String' or even 'java.lang.String'.
Copyright © 2009-2010 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans, licensed under the MIT licence.