public class TypeInfo extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private String |
genericType |
private static long |
serialVersionUID |
private String |
type |
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() |
private static final long serialVersionUID
private final String type
private final String genericType
public TypeInfo(String type)
type
- the typepublic String getType()
String -> String List-> List
public Optional<String> getGenericType()
List-> String; String -> Optional.empty()
public String getGenericTypeOrType()
String -> String List-> String
public String asString()
Copyright © 2015. All rights reserved.