public abstract class BaseType extends Object implements ResolvedType
| Modifier and Type | Field and Description |
|---|---|
protected ResolvedCustomFacets |
customFacets |
| Constructor and Description |
|---|
BaseType(String typeName,
TypeExpressionNode typeExpressionNode,
ResolvedCustomFacets customFacets) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(ResolvedType valueType) |
protected abstract BaseType |
copy() |
ResolvedCustomFacets |
customFacets()
Returns the custom facets definitions of this type
|
boolean |
doAccept(ResolvedType resolvedType) |
String |
getBuiltinTypeName()
Returns the builtin type name.
|
TypeExpressionNode |
getTypeExpressionNode()
The type declaration node that define this type
|
String |
getTypeName()
Returns the type name if any
|
static String |
getTypeName(TypeExpressionNode typeExpressionNode,
String defaultName) |
protected boolean |
isObjectWithOnlyTypeDecl(Node node)
This method detects the pattern of
type:
MyType
So that we can treat this as a reference to the node.
|
protected void |
overwriteFacets(BaseType from,
TypeDeclarationNode node) |
void |
setTypeName(String typeName) |
ResolvedType |
setTypeNode(TypeExpressionNode typeNode) |
void |
validateState()
Validate state consistency
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmergeFacets, overwriteFacets, validateCanOverwriteWith, visitprotected ResolvedCustomFacets customFacets
public BaseType(String typeName, TypeExpressionNode typeExpressionNode, ResolvedCustomFacets customFacets)
public ResolvedType setTypeNode(TypeExpressionNode typeNode)
setTypeNode in interface ResolvedTypeprotected abstract BaseType copy()
public ResolvedCustomFacets customFacets()
ResolvedTypecustomFacets in interface ResolvedTypeprotected void overwriteFacets(BaseType from, TypeDeclarationNode node)
protected boolean isObjectWithOnlyTypeDecl(Node node)
public final boolean accepts(ResolvedType valueType)
accepts in interface ResolvedTypepublic boolean doAccept(ResolvedType resolvedType)
public void setTypeName(String typeName)
@Nullable public String getTypeName()
ResolvedTypegetTypeName in interface ResolvedType@Nullable public String getBuiltinTypeName()
ResolvedTypegetBuiltinTypeName in interface ResolvedTypepublic TypeExpressionNode getTypeExpressionNode()
ResolvedTypegetTypeExpressionNode in interface ResolvedTypepublic void validateState()
ResolvedTypevalidateState in interface ResolvedType@Nonnull public static String getTypeName(TypeExpressionNode typeExpressionNode, String defaultName)
Copyright © 2020. All rights reserved.