InterpretedClass class
Represents a class definition at runtime.
- Implemented types
Constructors
-
InterpretedClass(String name, InterpretedClass? superclass, Environment classDefinitionEnvironment, List<
SFieldDeclaration> fieldDeclarations, Map<String, InterpretedFunction> methods, Map<String, InterpretedFunction> getters, Map<String, InterpretedFunction> setters, Map<String, InterpretedFunction> staticMethods, Map<String, InterpretedFunction> staticGetters, Map<String, InterpretedFunction> staticSetters, Map<String, Object?> staticFields, Map<String, InterpretedFunction> constructors, Map<String, InterpretedFunction> operators, {bool isAbstract = false, List<InterpretedClass> ? interfaces, bool isMixin = false, List<RuntimeType> ? onClauseTypes, List<InterpretedClass> ? mixins, List<BridgedClass> ? bridgedMixins, List<BridgedClass> ? bridgedInterfaces, bool isFinal = false, bool isInterface = false, bool isBase = false, bool isSealed = false, BridgedClass? bridgedSuperclass, List<String> typeParameterNames = const [], Map<String, RuntimeType?> typeParameterBounds = const {}})
Properties
- arity → int
-
no setteroverride
-
bridgedInterfaces
↔ List<
BridgedClass> -
getter/setter pair
-
bridgedMixins
↔ List<
BridgedClass> -
getter/setter pair
- bridgedSuperclass ↔ BridgedClass?
-
getter/setter pair
-
bridgedSuperTypeArgNames
↔ List<
String> ? -
Names of the type arguments supplied to bridgedSuperclass in the
script's
extendsclause (e.g.['RRect']forclass W extends CustomClipper<RRect>).getter/setter pair - classDefinitionEnvironment → Environment
-
final
-
constructors
→ Map<
String, InterpretedFunction> -
final
-
fieldDeclarations
→ List<
SFieldDeclaration> -
final
-
getters
→ Map<
String, InterpretedFunction> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
interfaces
↔ List<
InterpretedClass> -
getter/setter pair
- isAbstract → bool
-
final
- isBase → bool
-
final
- isFinal → bool
-
final
- isInterface → bool
-
final
- isMixin → bool
-
final
- isSealed → bool
-
final
-
methods
→ Map<
String, InterpretedFunction> -
final
-
mixins
↔ List<
InterpretedClass> -
getter/setter pair
- name → String
-
The name of the type.
final
-
onClauseTypes
↔ List<
RuntimeType> -
getter/setter pair
-
operators
→ Map<
String, InterpretedFunction> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
setters
→ Map<
String, InterpretedFunction> -
final
-
staticFields
→ Map<
String, Object?> -
final
-
staticGetters
→ Map<
String, InterpretedFunction> -
final
-
staticMethods
→ Map<
String, InterpretedFunction> -
final
-
staticSetters
→ Map<
String, InterpretedFunction> -
final
- superclass ↔ InterpretedClass?
-
getter/setter pair
-
typeParameterBounds
→ Map<
String, RuntimeType?> -
final
-
typeParameterNames
→ List<
String> -
final
Methods
-
call(
InterpreterVisitor visitor, List< Object?> positionalArguments, [Map<String, Object?> namedArguments = const {}, List<RuntimeType> ? typeArguments]) → Object? -
override
-
createAndInitializeInstance(
InterpreterVisitor visitor, List< RuntimeType> ? typeArguments) → InterpretedInstance -
findConstructor(
String name) → InterpretedFunction? -
findInstanceGetter(
String name) → InterpretedFunction? -
findInstanceMethod(
String name) → InterpretedFunction? -
findInstanceSetter(
String name) → InterpretedFunction? -
findOperator(
String operatorSymbol) → InterpretedFunction? -
findStaticGetter(
String name) → InterpretedFunction? -
findStaticMethod(
String name) → InterpretedFunction? -
findStaticSetter(
String name) → InterpretedFunction? -
freezeMemberTables(
) → void -
Freezes the per-class function tables once declaration wiring is done
(perf T6). Call this at the end of the Pass-2 member loop, after every
method/getter/setter/operator/static/constructor has been registered.
staticFieldsis intentionally excluded — static-field initialization is deferred (Bug-43 forward references) and mutates that map after this call. -
getAbstractInheritedMembers(
) → Map< String, InterpretedFunction> - Returns a map of all abstract members (methods, getters, setters) inherited from superclasses. The key is the member name, the value is the abstract InterpretedFunction.
-
getAllConcreteMembers(
) → Map< String, InterpretedFunction> -
Returns a map of all concrete instance members (methods, getters, setters)
available on this class, including those inherited via the
extendschain. Key: member name, Value: the concrete InterpretedFunction. -
getAllInterfaceMembers(
) → Map< String, String> - Returns a map representing all members required by the interfaces implemented by this class and its superclasses, including those from super-interfaces. Key: member name, Value: String indicating type ('method', 'getter', 'setter')
-
getConcreteMembers(
) → Map< String, InterpretedFunction> - Returns a map of all concrete instance members (methods, getters, setters) defined directly in this class AND in applied mixins. The key is the member name, the value is the concrete InterpretedFunction. Also includes instance fields (which implicitly provide getters).
-
getInstanceFieldNames(
) → Set< String> - Returns a set of all instance field names in this class and its superclass chain. Fields implicitly provide getters (and setters for non-final fields). G-DOV2-6 FIX: Walk the superclass chain to find fields from parent classes.
-
getStaticField(
String name) → Object? -
isSubtypeOf(
RuntimeType other, {Object? value}) → bool -
Checks if this class is a subtype of the
otherclass. This considers inheritance (extends), mixin application (with), interface implementation (implements), and bridged superclass chains.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setStaticField(
String name, Object? value) → void -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
extractTypeParameterBounds(
STypeParameterList? typeParameters, Environment? resolveEnvironment) → Map< String, RuntimeType?> -
extractTypeParameterNames(
STypeParameterList? typeParameters) → List< String> -
resolveTypeAnnotationDynamic(
SAstNode typeNode, Environment env) → RuntimeType