public final class TypeReference
extends Object
PropertyState. TypeReferences can point to a SystemType, ListTypeDescriptor, or LocalTypeDescriptor.| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_REF_STEM |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
boolean |
equals(SystemType systemType) |
static TypeReference |
from(ListTypeDescriptor listTypeDescriptor)
Constructs a TypeReference from a
ListTypeDescriptor |
static TypeReference |
from(LocalTypeDescriptor localTypeDescriptor)
Constructs a TypeReference from a
LocalTypeDescriptor |
static TypeReference |
from(SystemType type)
Constructs a TypeReference from a
SystemType |
List<TypeReference> |
getGenericTypeArguments()
Retrieves all type references for generic types.
|
TypeReference |
getListItemType()
Returns the type of a list's items
|
String |
getUnqualifiedTypeName()
The unqualified type name.
|
int |
hashCode() |
boolean |
isListType()
Whether the type points to a
ListTypeDescriptor |
boolean |
isLocalType()
Whether the type points to a
LocalTypeDescriptor |
boolean |
isSystemType()
Whether the type points to a
SystemType |
static TypeReference |
parse(String typeName)
Constructs a TypeReference from the
String representation of a type reference. |
String |
toString() |
SystemType |
toSystemType()
If the value is a
SystemType, constructs a SystemType from the TypeReference. |
public static final String TYPE_REF_STEM
public static TypeReference from(SystemType type)
SystemTypepublic static TypeReference from(LocalTypeDescriptor localTypeDescriptor)
LocalTypeDescriptorpublic static TypeReference from(ListTypeDescriptor listTypeDescriptor)
ListTypeDescriptorpublic static TypeReference parse(String typeName)
String representation of a type reference. For example "#/types/MyLocalType".public boolean isSystemType()
SystemTypepublic SystemType toSystemType()
SystemType, constructs a SystemType from the TypeReference. Otherwise throws a runtime exception.public boolean isLocalType()
LocalTypeDescriptorpublic boolean isListType()
ListTypeDescriptorpublic List<TypeReference> getGenericTypeArguments()
ListTypeDescriptor. For list types, the first item in the returned list is the type of the list's items.public TypeReference getListItemType()
public String getUnqualifiedTypeName()
toString() of the type for a LocalTypeDescriptor. For local types, removes the qualifier, "#/types", from the start of the name.public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic boolean equals(SystemType systemType)
Copyright © 2018-present Appian Corporation. All Rights Reserved.