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.
When adding foo.Spork, that FQN (Fully Qualified Name) will be returned as an option for any of these queries:
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeLibrary
public TypeLibrary()
createLibraryForSingleType
public static TypeLibrary createLibraryForSingleType(String fqnSingleton)
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', 'java.lang.String', or 'java.lang.*'.
- Returns:
- A list of Fully Qualified Names for all types in the library that fit the reference.
Copyright © 2009-2011 The Project Lombok Authors, licensed under the MIT licence.