FunctionReflection<O, R> class
abstract
Base class fro methods and constructors.
- Inheritance
-
- Object
- ElementReflection<
O> - FunctionReflection
- Implemented types
- Implementers
Constructors
-
FunctionReflection(ClassReflection<
O> classReflection, Type declaringType, String name, TypeReflection? returnType, bool returnNullable, bool isStatic, List<ParameterReflection> ? normalParameters, List<ParameterReflection> ? optionalParameters, Map<String, ParameterReflection> ? namedParameters, List<Object> ? annotations)
Properties
-
allJsonParametersNames
→ List<
String> -
Returns allParameters names.
no setter
-
allParameters
→ List<
ParameterReflection> -
Returns all the parameters: normalParameters, optionalParameters, namedParameters.
no setter
-
allParametersNames
→ List<
String> -
Returns allParameters names.
no setter
-
annotations
↔ List<
Object> -
The method annotations.
getter/setter pair
- className → String
-
Returns the class name of this element.
no setterinherited
-
classReflection
→ ClassReflection<
O> -
The ClassReflection of this element.
finalinherited
- declaringType → Type
-
The Type that declared this element.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasJsonNameAlias → bool
-
Returns
true
if any field or constructor parameter uses a JsonFieldAlias.no setter - hasNoParameters → bool
-
Returns
true
if this methods has no arguments/parameters.no setter - isStatic → bool
-
Returns
true
if this element is static.finalinherited - name → String
-
The name of this method.
final
-
namedParameters
→ Map<
String, ParameterReflection> -
The named parameters Types of this method.
final
-
namedParametersNames
→ List<
String> -
Returns the namedParameters names.
no setter
-
namedParametersTypeReflection
→ Map<
String, TypeReflection> -
Returns the namedParameters TypeReflections.
no setter
-
namedParametersTypes
→ Map<
String, Type> -
Returns the namedParameters Types.
no setter
-
normalParameters
→ List<
ParameterReflection> -
The normal parameters Types of this method.
final
-
normalParametersNames
→ List<
String> -
Returns the normalParameters names.
no setter
-
normalParametersTypeReflection
→ List<
TypeReflection> -
Returns the normalParameters TypeReflections.
no setter
-
normalParametersTypes
→ List<
Type> -
Returns the normalParameters Types.
no setter
-
optionalParameters
→ List<
ParameterReflection> -
The optional parameters Types of this method.
final
-
optionalParametersNames
→ List<
String> -
Returns the optionalParameters names.
no setter
-
optionalParametersTypeReflection
→ List<
TypeReflection> -
Returns the optionalParameters TypeReflections.
no setter
-
optionalParametersTypes
→ List<
Type> -
Returns the optionalParameters Types.
no setter
- parametersLength → int
-
Returns the amount of parameters.
no setter
- positionalParametersLength → int
-
Returns the amount of positional parameters (normalParameters + optionalParameters).
no setter
- requiredParametersLength → int
-
Returns the amount of required parameters.
no setter
- returnNullable → bool
-
true
if the returned value of this method can benull
.final - returnType → TypeReflection?
-
The return Type of this method. Returns
null
for void type.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compareTo(
FunctionReflection other) → int -
Compares this object to another object.
override
-
equalsNamedParametersTypes(
Map< String, Type> parameters, {bool equivalency = false}) → bool -
Returns
true
ifparameters
is equals to namedParameters. -
equalsNormalParametersTypes(
List< Type> parameters, {bool equivalency = false}) → bool -
Returns
true
ifparameters
is equals to normalParameters. -
equalsOptionalParametersTypes(
List< Type> parameters, {bool equivalency = false}) → bool -
Returns
true
ifparameters
is equals to optionalParameters. -
getParameterByIndex(
int index) → ParameterReflection? -
Returns a ParameterReflection by
index
. -
getParameterByName(
String name, {bool jsonName = false}) → ParameterReflection? -
Returns a ParameterReflection by
name
. -
getParametersByNames(
Iterable< String> names, {bool jsonName = false}) → List<ParameterReflection> -
Returns allParameters in
names
list. -
invoke(
Iterable< Object?> ? positionalArguments, [Map<Symbol, Object?> ? namedArguments]) → R - Invoke this method.
-
methodInvocation(
ParameterProvider parameterProvider) → MethodInvocation< O> -
Creates a MethodInvocation using
parameterProvider
. -
methodInvocationFromMap(
Map< String, dynamic> map, {FieldValueResolver? reviver, FieldNameResolver? nameResolver, bool jsonName = false}) → MethodInvocation<O> -
Creates a MethodInvocation using
map
entries as parameters. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parametersNamesWhere(
bool test(ParameterReflection parameter), {bool jsonName = false, String nameResolver(ParameterReflection parameter, String name)?}) → Iterable< String> -
Returns a List of parameters names that matches
test
. -
parametersWhere(
bool test(ParameterReflection parameter)) → Iterable< ParameterReflection> -
Returns a List of ParameterReflection that matches
test
. -
resolveAllParametersNames(
bool jsonName) → List< String> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited