public class TypeLibrary
extends java.lang.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(java.lang.String fullyQualifiedTypeName)
Add a type to the library.
|
static TypeLibrary |
createLibraryForSingleType(java.lang.String fqnSingleton) |
void |
lock() |
java.lang.String |
toQualified(java.lang.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 void lock()
public static TypeLibrary createLibraryForSingleType(java.lang.String fqnSingleton)
public void addType(java.lang.String fullyQualifiedTypeName)
fullyQualifiedTypeName
- the FQN type name, such as 'java.lang.String'.public java.lang.String toQualified(java.lang.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-2015 The Project Lombok Authors, licensed under the MIT licence.