Class ConcreteTypeInfo
- All Implemented Interfaces:
Serializable,MappableType,TypeInfo
Represents a general primitive type or object type that requires its target representation.
Like String in typescript as "string", int in typescript as "number".
Type with typical signature and render pattern like array-like types are represented as other type info.
- Author:
- Cause Chung
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumKind of types ConcreteTypeInfo can represent. -
Field Summary
Fields inherited from interface online.sharedtype.processor.domain.type.TypeInfo
NO_TYPE_INFO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMappedName(SharedType.TargetType targetType, String mappedName) mappedName(SharedType.TargetType targetType) voidmarkShallowResolved(TypeDef resolvedTypeDef) static ConcreteTypeInfoofPredefined(String qualifiedName, String simpleName) reify(Map<TypeVariableInfo, TypeInfo> mappings) Replace type variables with type arguments.booleanresolved()Check if this type and its dependency types are resolved.booleantoString()typeArgs()typeDef()Methods inherited from class online.sharedtype.processor.domain.type.ReferableTypeInfo
addReferencingType, referencingTypesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface online.sharedtype.processor.domain.MappableType
mappedNameOrDefault
-
Constructor Details
-
ConcreteTypeInfo
public ConcreteTypeInfo()
-
-
Method Details
-
ofPredefined
-
resolved
public boolean resolved()Description copied from interface:TypeInfoCheck if this type and its dependency types are resolved.
When parsing a type's structure, a dependency type is firstly captured as a
TypeInfo. At this stage, because we don't know its output structure or if it needs to be output at all, we mark it as unresolved. Also, due to possible cyclic dependencies, the resolution stage needs to be performed after initial parsing state. During resolution, once a type is parsed, it's marked as resolved. Note that a type is marked as resolved when created, if it can be determined at that time.Object contains resolved flag as a mutable state
-
reify
Description copied from interface:TypeInfoReplace type variables with type arguments. -
shallowResolved
public boolean shallowResolved() -
typeDef
- Returns:
- null when the type is not resolved if it's a user defined type; or does not have a corresponding
TypeDef, e.g. a predefined type.
-
qualifiedName
- Specified by:
qualifiedNamein interfaceMappableType
-
simpleName
-
typeArgs
-
toString
-