TypeReflection<T> class
Dart Type reflection.
- Available extensions
Constructors
-
TypeReflection(Type type, [List<
Object> ? arguments]) -
const
- TypeReflection.from(Object o)
-
factory
Properties
-
arguments
→ List<
TypeReflection> -
Returns the arguments of this type.
Example:
Map<String, int>
will return[String, int]
.no setter -
argumentsAsTypeInfo
→ List<
TypeInfo> -
Returns the arguments of this type as TypeInfo.
no setter
- argumentsLength → int
-
Returns the arguments length.
no setter
- hasArguments → bool
-
Returns
true
if this type has arguments.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- isBasicType → bool
-
Returns
true
if type isPrimitiveType orisCollection
.no setter - isBigInt → bool
-
Returns
true
if type is BigInt.no setter - isBoolType → bool
-
Returns
true
if type isbool
.no setter - isCollectionType → bool
-
Returns
true
if type is a collection (List, Iterable, Map or Set).no setter - isDoubleType → bool
-
Returns
true
if type isdouble
.no setter - isDynamicType → bool
-
Returns
true
if type isdynamic
.no setter - isEntityType → bool
-
Returns
true
if type can be an entity (![isObjectOrDynamicType] && ![isBasicType]).no setter - isIntType → bool
-
Returns
true
if type isint
.no setter - isIterableEntity → bool
-
Returns
true
if type isIterableType of entities.no setter - isIterableType → bool
-
Returns
true
if type isIterable
.no setter - isListEntity → bool
-
Returns
true
if type is a List of entities.no setter - isListType → bool
-
Returns
true
if type is a List.no setter - isMapType → bool
-
Returns
true
if type isMap
.no setter - isNumberType → bool
-
Returns
true
if type isint
,double
ornum
.no setter - isNumericType → bool
-
Returns
true
if type isint
,double
,num
or BigInt. See isNumberType and isBigIntno setter - isNumType → bool
-
Returns
true
if type isnum
.no setter - isObjectOrDynamicType → bool
-
Returns
true
if type isObject
ordynamic
.no setter - isObjectType → bool
-
Returns
true
if type isObject
.no setter - isPrimitiveType → bool
-
Returns
true
if type isString
,int
,double
,num
orbool
.no setter - isSetType → bool
-
Returns
true
if type is a Set.no setter - isStringType → bool
-
Returns
true
if type isString
.no setter - listEntityType → TypeReflection?
-
The TypeReflection of the List elements type.
no setter
- listType → TypeReflection?
-
The TypeReflection of the List elements type.
no setter
- mapKeyType → TypeReflection?
-
The TypeReflection of the Map key type.
no setter
- mapValueType → TypeReflection?
-
The TypeReflection of the Map value type.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → Type
-
The Dart Type.
final
- typeInfo → TypeInfo
-
Returns a TypeInfo of this instance.
no setter
- typeName → String
-
Returns the type name.
no setter
Methods
-
equalsArgumentsTypes(
List< Type> types) → bool -
Returns
true
if arguments have equalstypes
. -
isOfType(
Type type, [List< Type> ? arguments]) → bool -
Returns
true
if the parametertype
is equals to fieldtype
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
-
tVoid
→ TypeReflection<
void> -
final
Static Methods
Constants
-
tBigInt
→ const TypeReflection<
BigInt> -
tBool
→ const TypeReflection<
bool> -
tDouble
→ const TypeReflection<
double> - tDynamic → const TypeReflection
-
tFunction
→ const TypeReflection<
Function> -
tFuture
→ const TypeReflection<
Future> -
tFutureBool
→ const TypeReflection<
Future< bool> > -
tFutureDynamic
→ const TypeReflection<
Future> -
tFutureInt
→ const TypeReflection<
Future< int> > -
tFutureObject
→ const TypeReflection<
Future< Object> > -
tFutureOr
→ const TypeReflection<
FutureOr> -
tFutureOrBool
→ const TypeReflection<
FutureOr< bool> > -
tFutureOrDynamic
→ const TypeReflection<
FutureOr> -
tFutureOrInt
→ const TypeReflection<
FutureOr< int> > -
tFutureOrObject
→ const TypeReflection<
FutureOr< Object> > -
tFutureOrString
→ const TypeReflection<
FutureOr< String> > -
tFutureString
→ const TypeReflection<
Future< String> > -
tInt
→ const TypeReflection<
int> -
tList
→ const TypeReflection<
List> -
tListBool
→ const TypeReflection<
List< bool> > -
tListDouble
→ const TypeReflection<
List< double> > -
tListDynamic
→ const TypeReflection<
List> -
tListInt
→ const TypeReflection<
List< int> > -
tListNum
→ const TypeReflection<
List< num> > -
tListObject
→ const TypeReflection<
List< Object> > -
tListString
→ const TypeReflection<
List< String> > -
tMap
→ const TypeReflection<
Map> -
tMapObjectObject
→ const TypeReflection<
Map< Object, Object> > -
tMapStringDynamic
→ const TypeReflection<
Map< String, dynamic> > -
tMapStringObject
→ const TypeReflection<
Map< String, Object> > -
tMapStringString
→ const TypeReflection<
Map< String, String> > -
tNum
→ const TypeReflection<
num> -
tObject
→ const TypeReflection<
Object> -
tSet
→ const TypeReflection<
Set> -
tSetDynamic
→ const TypeReflection<
Set> -
tSetInt
→ const TypeReflection<
Set< int> > -
tSetObject
→ const TypeReflection<
Set< Object> > -
tSetString
→ const TypeReflection<
Set< String> > -
tString
→ const TypeReflection<
String>