MethodReflection<O, R> class

A class method reflection.

Inheritance

Constructors

MethodReflection(ClassReflection<O> classReflection, Type declaringType, String name, TypeReflection? returnType, bool returnNullable, MethodReflectionAccessor<O> methodAccessor, O? object, bool isStatic, List<ParameterReflection>? normalParameters, List<ParameterReflection>? optionalParameters, Map<String, ParameterReflection>? namedParameters, List<Object>? annotations)

Properties

allJsonParametersNames List<String>
Returns allParameters names.
no setterinherited
allParameters List<ParameterReflection>
Returns all the parameters: normalParameters, optionalParameters, namedParameters.
no setterinherited
allParametersNames List<String>
Returns allParameters names.
no setterinherited
annotations List<Object>
The method annotations.
getter/setter pairinherited
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 setterinherited
hasNoParameters bool
Returns true if this methods has no arguments/parameters.
no setterinherited
isStatic bool
Returns true if this element is static.
finalinherited
method Function
no setter
methodAccessor MethodReflectionAccessor<O>
final
name String
The name of this method.
finalinherited
namedParameters Map<String, ParameterReflection>
The named parameters Types of this method.
finalinherited
namedParametersNames List<String>
Returns the namedParameters names.
no setterinherited
namedParametersTypeReflection Map<String, TypeReflection>
Returns the namedParameters TypeReflections.
no setterinherited
namedParametersTypes Map<String, Type>
Returns the namedParameters Types.
no setterinherited
normalParameters List<ParameterReflection>
The normal parameters Types of this method.
finalinherited
normalParametersNames List<String>
Returns the normalParameters names.
no setterinherited
normalParametersTypeReflection List<TypeReflection>
Returns the normalParameters TypeReflections.
no setterinherited
normalParametersTypes List<Type>
Returns the normalParameters Types.
no setterinherited
object → O?
The associated object (O) of this method. null for static methods.
final
optionalParameters List<ParameterReflection>
The optional parameters Types of this method.
finalinherited
optionalParametersNames List<String>
Returns the optionalParameters names.
no setterinherited
optionalParametersTypeReflection List<TypeReflection>
Returns the optionalParameters TypeReflections.
no setterinherited
optionalParametersTypes List<Type>
Returns the optionalParameters Types.
no setterinherited
parametersLength int
Returns the amount of parameters.
no setterinherited
positionalParametersLength int
Returns the amount of positional parameters (normalParameters + optionalParameters).
no setterinherited
requiredParametersLength int
Returns the amount of required parameters.
no setterinherited
returnNullable bool
true if the returned value of this method can be null.
finalinherited
returnType TypeReflection?
The return Type of this method. Returns null for void type.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(FunctionReflection other) int
Compares this object to another object.
inherited
equalsNamedParametersTypes(Map<String, Type> parameters, {bool equivalency = false}) bool
Returns true if parameters is equals to namedParameters.
inherited
equalsNormalParametersTypes(List<Type> parameters, {bool equivalency = false}) bool
Returns true if parameters is equals to normalParameters.
inherited
equalsOptionalParametersTypes(List<Type> parameters, {bool equivalency = false}) bool
Returns true if parameters is equals to optionalParameters.
inherited
getParameterByIndex(int index) ParameterReflection?
Returns a ParameterReflection by index.
inherited
getParameterByName(String name, {bool jsonName = false}) ParameterReflection?
Returns a ParameterReflection by name.
inherited
getParametersByNames(Iterable<String> names, {bool jsonName = false}) List<ParameterReflection>
Returns allParameters in names list.
inherited
invoke(Iterable<Object?>? positionalArguments, [Map<Symbol, Object?>? namedArguments]) → R
Invoke this method.
inherited
methodInvocation(ParameterProvider parameterProvider) MethodInvocation<O>
Creates a MethodInvocation using parameterProvider.
inherited
methodInvocationFromMap(Map<String, dynamic> map, {FieldValueResolver? reviver, FieldNameResolver? nameResolver, bool jsonName = false}) MethodInvocation<O>
Creates a MethodInvocation using map entries as parameters.
inherited
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.
inherited
parametersWhere(bool test(ParameterReflection parameter)) Iterable<ParameterReflection>
Returns a List of ParameterReflection that matches test.
inherited
resolveAllParametersNames(bool jsonName) List<String>
inherited
toString() String
A string representation of this object.
override
withObject(O object) MethodReflection<O, R>
Returns a new instance that references object.

Operators

operator ==(Object other) bool
The equality operator.
inherited