Type
class in package klyn

    public class Type extends Object:

Object
└ Type

Class representing a type in the reflection system.

Fields

Modifier and Type | Member | Description
--- | --- | ---
public static readonly | FLAG_ABSTRACT `FLAG_ABSTRACT as Int = 16` | Flag used for abstract types/members.
public static readonly | FLAG_ANNOTATION `FLAG_ANNOTATION as Int = 1024` | Flag used for annotations.
public static readonly | FLAG_ENUM `FLAG_ENUM as Int = 2048` | Flag used for enums.
public static readonly | FLAG_FINAL `FLAG_FINAL as Int = 32` | Flag used for final types/members.
public static readonly | FLAG_INTERFACE `FLAG_INTERFACE as Int = 512` | Flag used for interfaces.
public static readonly | FLAG_NATIVE `FLAG_NATIVE as Int = 128` | Flag used for native members.
public static readonly | FLAG_OVERRIDE `FLAG_OVERRIDE as Int = 256` | Flag used for override members.
public static readonly | FLAG_PRIVATE `FLAG_PRIVATE as Int = 2` | Flag used for private members/types.
public static readonly | FLAG_PROTECTED `FLAG_PROTECTED as Int = 4` | Flag used for protected members/types.
public static readonly | FLAG_PUBLIC `FLAG_PUBLIC as Int = 1` | Flag used for public members/types.
public static readonly | FLAG_READONLY `FLAG_READONLY as Int = 64` | Flag used for readonly members.
public static readonly | FLAG_STATIC `FLAG_STATIC as Int = 8` | Flag used for static members.

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | annotations `annotations as ArrayList<Annotation>:` | Returns annotations applied to the type.
public readonly property | attributes `attributes as ArrayList<klyn.reflection.Attribute>:` | Reflected attributes declared on the type.
public readonly property | fullName `fullName as String:` | Fully qualified type name.
public readonly property | genericParameterCount `genericParameterCount as Int:` | Returns the number of generic parameters declared by the base type.
public readonly property | implementedInterfaces `implementedInterfaces as ArrayList<Type>:` | Returns interfaces implemented by this type.
public readonly property | isAbstract `isAbstract as Boolean:` | Indicates whether the type is abstract.
public readonly property | isAnnotation `isAnnotation as Boolean:` | Indicates whether the type is an annotation.
public readonly property | isEnum `isEnum as Boolean:` | Indicates whether the type is an enum.
public readonly property | isFinal `isFinal as Boolean:` | Indicates whether the type is final.
public readonly property | isGenericInstantiation `isGenericInstantiation as Boolean:` | Indicates whether this type represents a concrete generic instantiation.
public readonly property | isInterface `isInterface as Boolean:` | Indicates whether the type is an interface.
public readonly property | isNative `isNative as Boolean:` | Indicates whether the type is native.
public readonly property | isOverride `isOverride as Boolean:` | Indicates whether the type is marked as override.
public readonly property | isPrivate `isPrivate as Boolean:` | Indicates whether the type is private.
public readonly property | isProtected `isProtected as Boolean:` | Indicates whether the type is protected.
public readonly property | isPublic `isPublic as Boolean:` | Indicates whether the type is public.
public readonly property | isReadonly `isReadonly as Boolean:` | Indicates whether the type is marked readonly.
public readonly property | isStatic `isStatic as Boolean:` | Indicates whether the type is static.
public readonly property | name `name as String:` | Short type name without package prefix.
public readonly property | superType `superType as Type:` | Returns the direct parent type, if any.

Inherited Properties
property Inherited Properties from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | Type `Type(name as String, fullName as String, flags as Int = 0, superName as String = ""):` | Constructor for Type

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | createInstance `createInstance(args... as Object) as Object throws Exception:` | Creates an instance of this type through reflection.
public | genericParameterNames `genericParameterNames() as ArrayList<String>:` | Returns the generic parameter names declared by the base type.
public | getAttribute `getAttribute(attributeName as String, notInherited as Boolean = true) as klyn.reflection.Attribute:` | Method to get a specific attribute of the type.
public | getAttributes `getAttributes(notInherited as Boolean = true) as ArrayList<klyn.reflection.Attribute>:` | Method to get the attributes of the type.
public | getConstructor `getConstructor(arity as Int = 0) as Constructor:` | Returns constructor metadata invocable with the requested arity.
public | getConstructors `getConstructors() as ArrayList<Constructor>:` | Returns constructors declared on this type.
public | getMethod `getMethod(methodName as String, notInherited as Boolean = true, types... as Type) as Method:` | Method to get a specific method of the type.
public | getMethods `getMethods(notInherited as Boolean = true) as ArrayList<Method>:` | Method to get the methods of the type.
public | getProperties `getProperties(notInherited as Boolean = true) as ArrayList<klyn.reflection.Property>:` | Method to get the properties of the type.
public | getProperty `getProperty(propertyName as String, notInherited as Boolean = true) as Property:` | Method to get a specific property of the type.
public override | toString `toString() as String:` | Returns the full type name when available.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml
Operators

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.