public class TypeLibrary extends Object
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:
| Constructor and Description |
|---|
TypeLibrary() |
| Modifier and Type | Method and Description |
|---|---|
void |
addType(String fullyQualifiedTypeName)
Add a type to the library.
|
static TypeLibrary |
createLibraryForSingleType(String fqnSingleton) |
Collection<String> |
findCompatible(String typeReference)
Returns all items in the type library that may be a match to the provided type.
|
public static TypeLibrary createLibraryForSingleType(String fqnSingleton)
public void addType(String fullyQualifiedTypeName)
fullyQualifiedTypeName - the FQN type name, such as 'java.lang.String'.public Collection<String> findCompatible(String typeReference)
typeReference - something like 'String', 'java.lang.String', or 'java.lang.*'.Copyright © 2009-2011 The Project Lombok Authors, licensed under the MIT licence.