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) |
String |
toQualified(String typeReference)
Translates an unqualified name such as 'String' to 'java.lang.String', _if_ you added 'java.lang.String' to the library via the
addType method. |
public static TypeLibrary createLibraryForSingleType(String fqnSingleton)
public void addType(String fullyQualifiedTypeName)
fullyQualifiedTypeName - the FQN type name, such as 'java.lang.String'.public String toQualified(String typeReference)
addType method.
Also returns the input if it is equal to a fully qualified name added to this type library.
Returns null if it does not match any type in this type library.Copyright © 2009-2013 The Project Lombok Authors, licensed under the MIT licence.