Class ArrayTypeInfo
java.lang.Object
online.sharedtype.processor.domain.type.ArrayTypeInfo
- All Implemented Interfaces:
Serializable,TypeInfo
Represents an array-like type.
During parsing, a predefined array-like type and its subtypes is captured as this class.
A type will be recognized as this type with higher priority than
Predefined array-like types can be configured in global properties. Default is
ConcreteTypeInfo.
It has no counterpart typeDef, explicitly annotating @SharedType on an array type is ignored with a warning.
Predefined array-like types can be configured in global properties. Default is
Iterable.- Author:
- Cause Chung
- See Also:
-
Field Summary
Fields inherited from interface online.sharedtype.processor.domain.type.TypeInfo
NO_TYPE_INFO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReferencingType(TypeDef typeDef) Mark this type as referenced by another type.reify(Map<TypeVariableInfo, TypeInfo> mappings) Replace type variables with type arguments.booleanresolved()Check if this type and its dependency types are resolved.toString()
-
Constructor Details
-
ArrayTypeInfo
public ArrayTypeInfo()
-
-
Method Details
-
component
-
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. -
toString
-