saker.build Documentation TaskDoc JavaDoc Packages
public interface TypeInformation extends InformationHolder
Interface holding information about a given type.

Each type information is associated with a given kind. The kind determines how the type itself should be viewed as from a scripting perspective. Correctly defining it can result in better user experience as more related completion proposals, and information can be displayed to the user.

The additional method in this interface provides additional information about the fields, documentation, and type hierarchy for the given type.

Methods
public default List<extends TypeInformation>
Gets the type information about the element types of this type.
public default Map<String, FieldInformation>
Gets information about what kind of enumeration values this type decalres.
public default Map<String, FieldInformation>
Gets information about the fields this type has.
public default FormattedTextContent
Gets documentational information about this type.
public String
Gets the kind of the type.
public default Set<TypeInformation>
Gets a collection of related types to this type information.
public default Set<TypeInformation>
Gets the super types of this type.
public default String
Gets the qualified name of the type.
public default String
Gets the simple name of the type.
public default boolean
Gets if the type is deprecated.
public default List<extends TypeInformation> getElementTypes()
Gets the type information about the element types of this type.

See TypeInformationKind.COLLECTION and TypeInformationKind.MAP for more information.

The elements in the returned list may be null to represent that a given element type at the index is unknown, unspecified, or doesn't have a specific type.

An unmodifiable list of element types for this type.
Gets information about what kind of enumeration values this type decalres.

The returned informations usually have their types as this type.

An unmodifiable map of enumeration value informations or null if not available.
Gets information about the fields this type has.
An unmodifiable map of field informations or null if not available.
Gets documentational information about this type.
The information.
public abstract String getKind()
Gets the kind of the type.

The kind determines how the consumer should handle this type information.

The type kind.
Gets a collection of related types to this type information.

Related types are which can be used in similar contexts as this type. E.g. If the type of a parameter is T, and if type E can be used as a value to assign to the parameter with type T, then E can be considered to be related to T, as it can be used in the same place as type T.

The related types should be chosen carefully, and only when appropriate. Script models might use these types to provide additional suggestions when satisfying type requirements, therefore returning unrelated types for these suggestions might result in runtime errors.

Super types should not be included in the results.

The related types.
Gets the super types of this type.

Any direct superclasses and superinterfaces should be returned in this method. Transitive superclasses and superinterfaces may be too, but not required.

An unmodifiable set of supertypes or null if not available.
public default String getTypeQualifiedName()
Gets the qualified name of the type.
The qualified name of the type, or null if not applicable or not available.
public default String getTypeSimpleName()
Gets the simple name of the type.
The simple name of the type or null if not available.
public default boolean isDeprecated()
Gets if the type is deprecated.
true if the type is deprecated.