Arbor 3: FSM & BT Graph Editor 3.6.8

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 | GetBaseType (Type type)
| Return base type More...
static bool | IsGenericType (Type type)
| Returns whether type is a generic type. 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 | 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...

## 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.

## ◆ 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
  型の名前

## ◆ 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.

## ◆ 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を返す

## ◆ 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.

## ◆ IsSerializable()

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

Returns whether it is serializable.

Parameters

  type | Type

Returns
  Returns true if serializable.

## ◆ 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.

## ◆ TidyAssemblyTypeName()

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

Convert Type to a serializable string.

Parameters

  type | Type value

Returns
  Serializable string