Arbor 3: FSM & BT Graph Editor 3.7.5

Static Public Member Functions | List of all members
TypeUtility Class Reference

Type utility class More...

## Static Public Member Functions
static string | GetTypeName (Type type)
| Returns the name of the type. More...
static string | GetSlotTypeName (Type type)
| Return type name (for data slot) More...
static string | TidyAssemblyTypeName (Type type)
| Convert Type to a serializable string. More...
static Type | GetAssemblyType (string assemblyTypeName)
| Get System.Type from string. More...
static Type[] | GetTypesFromAssembly (Assembly assembly)
| Returns the type defined in Assembly. More...
static Assembly | GetAssembly (Type type)
| Gets the Assembly in which the type is declared. More...
static Type | GetBaseType (Type type)
| Return base type More...
static bool | IsGenericType (Type type)
| Returns whether type is a generic type. More...
static bool | IsGenericTypeDefinition (Type type)
| Returns whether it is a generic type definition. More...
static Type[] | GetGenericArguments (Type type)
| Return an array of generic type arguments. More...
static bool | IsGeneric (Type type, Type genericTypeDefinition)
| Returns whether it is a generic type constructed from the specified generic type definition. More...
static bool | IsPrimitive (Type type)
| Returns whether or not it is a primitive type. More...
static bool | IsEnum (Type type)
| Returns whether or not it is an enumeration. More...
static bool | IsClass (Type type)
| Returns whether or not it is a class type. More...
static bool | IsInterface (Type type)
| Returns whether or not it is a interface type. More...
static bool | IsValueType (Type type)
| Returns whether or not it is a value type. More...
static bool | IsSerializable (Type type)
| Returns whether it is serializable. More...
static bool | IsAbstract (Type type)
| Returns whether or not it is an abstract type. More...
static bool | ContainsGenericParameters (Type type)
| Returns whether or not it contains a generic type parameter. More...
static MemberInfo | GetMemberInfo (Type type)
| Get MemberInfo More...
static bool | IsSubclassOf (Type type, Type c)
| Determine whether it is a derived type or not. More...
static bool | IsAssignableFrom (Type type, Type c)
| It is judged whether or not it is an assignable type. More...
static FieldInfo[] | GetFields (Type type, BindingFlags bindingAttr)
| Get type fields. More...
static bool | IsSealed (Type type)
| Gets whether the class is declared sealed. More...
static bool | IsStatic (Type type)
| Get whether it is a static class. More...
static bool | IsReferenceableType (Assembly assembly, Type type)
| Determine if the Assembly can reference the Type. More...
static bool | IsDynamic (Assembly assembly)
| Determine if the Assembly was dynamically generated. More...
static Type | GetTypeRenamedFrom (string typeName)
| Get the type from the type name before renaming. More...

## Detailed Description

Type utility class

## Member Function Documentation

## ◆ ContainsGenericParameters()

static bool ContainsGenericParameters | ( | Type | type | ) |
| static

Returns whether or not it contains a generic type parameter.

Parameters

  type | Type

Returns
  Returns true if it contains a generic type parameter.

## ◆ GetAssembly()

static Assembly GetAssembly | ( | Type | type | ) |
| static

Gets the Assembly in which the type is declared.

Parameters

  type | Type

Returns
  Assembly in which the type is declared

## ◆ GetAssemblyType()

static Type GetAssemblyType | ( | string | assemblyTypeName | ) |
| static

Get System.Type from string.

Parameters

  assemblyTypeName | Type name

Returns
  System.Type. If assemblyTypeName is empty or null, it returns null.

## ◆ GetBaseType()

static Type GetBaseType | ( | Type | type | ) |
| static

Return base type

Parameters

  type | Type

Returns
  Base type

## ◆ GetFields()

static FieldInfo [] GetFields | ( | Type | type,
|  | BindingFlags | bindingAttr
| ) |  |
| static

Get type fields.

Parameters

  type | Type
  bindingAttr | Flag that controls how the field is searched

Returns
  Array of FieldInfo

## ◆ GetGenericArguments()

static Type [] GetGenericArguments | ( | Type | type | ) |
| static

Return an array of generic type arguments.

Parameters

  type | Type

Returns
  An array of generic type arguments

## ◆ GetMemberInfo()

static MemberInfo GetMemberInfo | ( | Type | type | ) |
| static

Get MemberInfo

Parameters

  type | Type

Returns
  MemberInfo

## ◆ GetSlotTypeName()

static string GetSlotTypeName | ( | Type | type | ) |
| static

Return type name (for data slot)

Parameters

  type | Type

Returns
  Type name

## ◆ GetTypeName()

static string GetTypeName | ( | Type | type | ) |
| static

Returns the name of the type.

Parameters

  type | Type

Returns
  型の名前

## ◆ GetTypeRenamedFrom()

static Type GetTypeRenamedFrom | ( | string | typeName | ) |
| static

Get the type from the type name before renaming.

Parameters

  typeName | Type name before renaming

Returns
  Type

## ◆ GetTypesFromAssembly()

static Type [] GetTypesFromAssembly | ( | Assembly | assembly | ) |
| static

Returns the type defined in Assembly.

Parameters

  assembly | Assembly

Returns
  An array of types defined in Assembly. Returns an empty array on failure.

## ◆ IsAbstract()

static bool IsAbstract | ( | Type | type | ) |
| static

Returns whether or not it is an abstract type.

Parameters

  type | Type

Returns
  Returns true if it is an abstract type.

## ◆ IsAssignableFrom()

static bool IsAssignableFrom | ( | Type | type,
|  | Type | c
| ) |  |
| static

It is judged whether or not it is an assignable type.

Parameters

  type | 型
  c | Type to be compared

Returns
  Returns true if an instance of c can be assigned to an instance of type.

## ◆ IsClass()

static bool IsClass | ( | Type | type | ) |
| static

Returns whether or not it is a class type.

Parameters

  type | Type

Returns
  Returns true if it is a class type.

## ◆ IsDynamic()

static bool IsDynamic | ( | Assembly | assembly | ) |
| static

Determine if the Assembly was dynamically generated.

Parameters

  assembly | Assembly

Returns
  Returns true if the Assembly is dynamically generated.

## ◆ IsEnum()

static bool IsEnum | ( | Type | type | ) |
| static

Returns whether or not it is an enumeration.

Parameters

  type | Type

Returns
  Return true if it is an enumeration.

## ◆ IsGeneric()

static bool IsGeneric | ( | Type | type,
|  | Type | genericTypeDefinition
| ) |  |
| static

Returns whether it is a generic type constructed from the specified generic type definition.

Parameters

  type | Type
  genericTypeDefinition | Generic type definition

Returns
  Return true if type is a generic type constructed from genericTypeDefinition.

## ◆ IsGenericType()

static bool IsGenericType | ( | Type | type | ) |
| static

Returns whether type is a generic type.

Parameters

  type | Type

Returns
  ジェネリック型であればtrueを返す

## ◆ IsGenericTypeDefinition()

static bool IsGenericTypeDefinition | ( | Type | type | ) |
| static

Returns whether it is a generic type definition.

Parameters

  type | Type

Returns
  Returns true if it is a generic type definition

## ◆ IsInterface()

static bool IsInterface | ( | Type | type | ) |
| static

Returns whether or not it is a interface type.

Parameters

  type | Type

Returns
  Returns true if it is a interface type.

## ◆ IsPrimitive()

static bool IsPrimitive | ( | Type | type | ) |
| static

Returns whether or not it is a primitive type.

Parameters

  type | Type

Returns
  Returns true if it is a primitive type.

## ◆ IsReferenceableType()

static bool IsReferenceableType | ( | Assembly | assembly,
|  | Type | type
| ) |  |
| static

Determine if the Assembly can reference the Type.

Parameters

  assembly | Assembly
  type | Type

Returns
  Returns true if Assembly can refer to Type.

## ◆ IsSealed()

static bool IsSealed | ( | Type | type | ) |
| static

Gets whether the class is declared sealed.

Parameters

  type | Type

Returns
  Returns true if the class is declared sealed.

## ◆ IsSerializable()

static bool IsSerializable | ( | Type | type | ) |
| static

Returns whether it is serializable.

Parameters

  type | Type

Returns
  Returns true if serializable.

## ◆ IsStatic()

static bool IsStatic | ( | Type | type | ) |
| static

Get whether it is a static class.

Parameters

  type | Type

Returns
  Returns true if it is a static class.

## ◆ IsSubclassOf()

static bool IsSubclassOf | ( | Type | type,
|  | Type | c
| ) |  |
| static

Determine whether it is a derived type or not.

Parameters

  type | Type
  c | Type to be compared

Returns
  Returns true if type is derived from c.

## ◆ IsValueType()

static bool IsValueType | ( | Type | type | ) |
| static

Returns whether or not it is a value type.

Parameters

  type | Type

Returns
  Returns true if it is a value type.

## ◆ TidyAssemblyTypeName()

static string TidyAssemblyTypeName | ( | Type | type | ) |
| static

Convert Type to a serializable string.

Parameters

  type | Type value

Returns
  Serializable string