public class TypeReference extends ValueType
TypeShortener without a Class or javax.lang.model reference.ValueType.FieldReceiver| Modifier and Type | Method and Description |
|---|---|
protected void |
addFields(ValueType.FieldReceiver fields)
Implement this method to report the name and value of each field.
|
TypeReference |
getEnclosingType()
Returns a
TypeReference to the type enclosing this one. |
String |
getNestedSuffix()
The part of the qualified name that comes after the top level type, including the period.
|
String |
getPackage() |
String |
getQualifiedName() |
String |
getSimpleName() |
String |
getTopLevelTypeSimpleName() |
boolean |
isTopLevel() |
TypeReference |
nestedType(String simpleName) |
static TypeReference |
to(String packageName,
String topLevelType,
String... nestedTypes)
Returns a
TypeReference for a type in packageName. |
static TypeReference |
to(TypeElement type)
Returns a
TypeReference for type. |
String |
toString() |
public static TypeReference to(String packageName, String topLevelType, String... nestedTypes)
TypeReference for a type in packageName. If nestedTypes is
empty, it is a top level type called topLevelType; otherwise, it is nested in that
type.public static TypeReference to(TypeElement type)
TypeReference for type.protected void addFields(ValueType.FieldReceiver fields)
ValueTypepublic String getPackage()
public String getTopLevelTypeSimpleName()
public String getNestedSuffix()
public String getQualifiedName()
public String getSimpleName()
public boolean isTopLevel()
public TypeReference nestedType(String simpleName)
public TypeReference getEnclosingType()
TypeReference to the type enclosing this one.IllegalStateException - if isTopLevel() returns trueCopyright © 2015 Google, Inc.. All rights reserved.