public class TypeInfo extends Object implements Serializable
| Constructor and Description |
|---|
TypeInfo(String type)
Constructs a new TypeInfo so that it represents a basic type.
|
TypeInfo(String type,
String genericType)
Constructs a new TypeInfo so that it represents a basic type or a type with generics.
|
| Modifier and Type | Method and Description |
|---|---|
String |
asString()
Returns the string representation of the type and generic type.
|
Optional<String> |
getGenericType()
Returns the generic type.
|
String |
getGenericTypeOrType()
Returns the generic type if it exists otherwise the base type.
|
String |
getType()
Returns the base type.
|
String |
toString() |
public TypeInfo(String type)
type - the typepublic String getType()
String -> String List<String> -> List
public Optional<String> getGenericType()
List<String> -> String; String -> Optional.empty()
public String getGenericTypeOrType()
String -> String List<String> -> String
public String asString()
Copyright © 2015. All rights reserved.