public class Type extends Object
Class representing a type in the reflection system.
| Modifier and Type | Member | Description |
|---|---|---|
| public const | FLAG_ABSTRACTFLAG_ABSTRACT as Int = 16 |
Flag used for abstract types/members. |
| public const | FLAG_ANNOTATIONFLAG_ANNOTATION as Int = 1024 |
Flag used for annotations. |
| public const | FLAG_CONSTFLAG_CONST as Int = 131072 |
Flag used for compile-time class constants. |
| public const | FLAG_ENUMFLAG_ENUM as Int = 2048 |
Flag used for enums. |
| public const | FLAG_FINALFLAG_FINAL as Int = 32 |
Flag used for final types/members. |
| public const | FLAG_INTERFACEFLAG_INTERFACE as Int = 512 |
Flag used for interfaces. |
| public const | FLAG_NATIVEFLAG_NATIVE as Int = 128 |
Flag used for native members. |
| public const | FLAG_OVERRIDEFLAG_OVERRIDE as Int = 256 |
Flag used for override members. |
| public const | FLAG_PRIVATEFLAG_PRIVATE as Int = 2 |
Flag used for private members/types. |
| public const | FLAG_PROTECTEDFLAG_PROTECTED as Int = 4 |
Flag used for protected members/types. |
| public const | FLAG_PUBLICFLAG_PUBLIC as Int = 1 |
Flag used for public members/types. |
| public const | FLAG_READONLYFLAG_READONLY as Int = 64 |
Flag used for readonly members. |
| public const | FLAG_STATICFLAG_STATIC as Int = 8 |
Flag used for static members. |
| public const | FLAG_WRITEONLYFLAG_WRITEONLY as Int = 262144 |
Flag used for write-only properties. |
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | annotationsannotations as ArrayList<Annotation> |
Returns annotations applied to the type. |
| public readonly property | attributesattributes as ArrayList<klyn.reflection.Attribute> |
Reflected attributes declared on the type. |
| public readonly property | fullNamefullName as String |
Fully qualified type name. |
| public readonly property | genericArgumentCountgenericArgumentCount as ULong |
Returns the number of concrete generic arguments. |
| public readonly property | genericDefinitiongenericDefinition as Type |
Returns the open generic type represented by this concrete instantiation. |
| public readonly property | genericDefinitionNamegenericDefinitionName as String |
Returns the fully qualified open generic definition name. |
| public readonly property | genericParameterCountgenericParameterCount as ULong |
Returns the number of generic parameters declared by the base type. |
| public readonly property | implementedInterfaces | Returns interfaces implemented by this type. |
| public readonly property | isAbstractisAbstract as Boolean |
Indicates whether the type is abstract. |
| public readonly property | isAnnotationisAnnotation as Boolean |
Indicates whether the type is an annotation. |
| public readonly property | isEnumisEnum as Boolean |
Indicates whether the type is an enum. |
| public readonly property | isFinalisFinal as Boolean |
Indicates whether the type is final. |
| public readonly property | isGenericInstantiationisGenericInstantiation as Boolean |
Indicates whether this type represents a concrete generic instantiation. |
| public readonly property | isInterfaceisInterface as Boolean |
Indicates whether the type is an interface. |
| public readonly property | isNativeisNative as Boolean |
Indicates whether the type is native. |
| public readonly property | isOverrideisOverride as Boolean |
Indicates whether the type is marked as override. |
| public readonly property | isPrivateisPrivate as Boolean |
Indicates whether the type is private. |
| public readonly property | isProtectedisProtected as Boolean |
Indicates whether the type is protected. |
| public readonly property | isPublicisPublic as Boolean |
Indicates whether the type is public. |
| public readonly property | isReadonlyisReadonly as Boolean |
Indicates whether the type is marked readonly. |
| public readonly property | isStaticisStatic as Boolean |
Indicates whether the type is static. |
| public readonly property | namename as String |
Short type name without package prefix. |
| public readonly property | superTypesuperType as Type |
Returns the direct parent type, if any. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Type | Constructor for Type |
| Modifier and Type | Member | Description |
|---|---|---|
| public | createInstance | Creates an instance of this type through reflection. |
| public | genericArguments | Returns the concrete generic arguments in declaration order. |
| public | genericParameterNames | Returns the generic parameter names declared by the base type. |
| public | getAttributegetAttribute(attributeName as String, notInherited as Boolean = true) as klyn.reflection.Attribute |
Method to get a specific attribute of the type. |
| public | getAttributesgetAttributes(notInherited as Boolean = true) as ArrayList<klyn.reflection.Attribute> |
Method to get the attributes of the type. |
| public | getConstructorgetConstructor(arity as Long = 0) as Constructor |
Returns constructor metadata invocable with the requested arity. |
| public | getConstructorsgetConstructors() as ArrayList<Constructor> |
Returns constructors declared on this type. |
| public | getMethod | Method to get a specific method of the type. |
| public | getMethods | Method to get the methods of the type. |
| public | getPropertiesgetProperties(notInherited as Boolean = true) as ArrayList<klyn.reflection.Property> |
Method to get the properties of the type. |
| public | getProperty | Method to get a specific property of the type. |
| public override | hashhash() as Long |
Returns the hash of the qualified name used by type equality. |
| public override | toStringtoString() as String |
Returns the full type name when available. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | operator!=(left as Type, right as Type) as Boolean | Returns the negation of type equality. |
| public static | operator==(left as Type, right as Type) as Boolean | Compares two reflected types by full name. |