RootPodDefinition class final

A concrete implementation of AbstractPodDefinition that serves as the default pod definition in the system.

RootPodDefinition is commonly used as the base representation of a pod’s configuration and lifecycle. It supports cloning, copying from another AbstractPodDefinition, and extending with additional metadata.

Example

final rootDef = RootPodDefinition(
  name: "myService",
  type: Class<OtherService>(),
);

rootDef.setIsStale(true);
if (rootDef.getIsStale()) {
  print("Pod is stale and needs re-evaluation.");
}

// Cloning
final cloned = rootDef.clone();
print(cloned.name); // "myService"
Inheritance

Constructors

RootPodDefinition({required Class type, PodInstanceSupplier? instanceSupplier, PodLifecycleInvoker? initMethodInvoker, PodLifecycleInvoker? destroyMethodInvoker})
A concrete implementation of AbstractPodDefinition that serves as the default pod definition in the system.
RootPodDefinition.from(PodDefinition other)
Creates a new RootPodDefinition by copying the state of another AbstractPodDefinition.
factory

Properties

annotatedClasses → List<Class>
The list of annotation classes which the type of this pod definition is annotated with.
finalinherited
annotations → List<Annotation>
The complete list of annotations discovered on the class and its meta-annotations.
finalinherited
autowireCandidate ↔ AutowireCandidateDescriptor
Defines whether this pod is eligible for autowiring.
getter/setter pairinherited
canProxy ↔ bool
Whether this pod is eligible for proxying.
getter/setter pairinherited
dependencyCheck ↔ DependencyCheck
Defines the dependency validation strategy.
getter/setter pairinherited
dependsOn ↔ List<DependencyDesign>
Other dependencies that this pod depends on.
getter/setter pairinherited
description ↔ String?
A description of the pod.
getter/setter pairinherited
design ↔ DesignDescriptor
Defines the design role of the pod.
getter/setter pairinherited
destroyMethodInvoker ↔ PodLifecycleInvoker?
Direct AOT compiled destruction method invoker (e.g. for @PreDestroy).
getter/setter pairinherited
executableArgumentValues ↔ ConstructorArgumentValues
Arguments to be passed to the pod’s constructor.
getter/setter pairinherited
factoryMethod ↔ FactoryMethodDesign
The factory method used to create this pod.
getter/setter pairinherited
hasBeforeInstantiationResolved ↔ bool
Whether this pod has been resolved before instantiation.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
initMethodInvoker ↔ PodLifecycleInvoker?
Direct AOT compiled initialization method invoker (e.g. for @PostConstruct).
getter/setter pairinherited
instance ↔ Object?
The instance of the pod definition.
getter/setter pairinherited
instanceSupplier ↔ PodInstanceSupplier?
Direct AOT compiled instance supplier function. When present, the container invokes this supplier directly, bypassing reflection.
getter/setter pairinherited
isPodProvider ↔ bool
Whether this pod is a provider of other pods.
getter/setter pairinherited
lifecycle ↔ LifecycleDesign
Defines the lifecycle behavior of the pod.
getter/setter pairinherited
name ↔ String
The unique name of the pod (component).
getter/setter pairinherited
preferredConstructors → List<Constructor>
List of preferred constructors for autowiring.
finalinherited
propertyValues ↔ MutablePropertyValues
Mutable property values assigned to this pod.
getter/setter pairinherited
resolvedDestroyMethodName ↔ String?
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope ↔ ScopeDesign
Defines the scope of the pod.
getter/setter pairinherited
type ↔ Class
The Class type that this pod represents.
getter/setter pairinherited

Methods

clone() → PodDefinition
Creates and returns a deep clone of this pod definition.
override
equalizedProperties() → List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
inherited
getAnnotation<A>() → A?
Returns the annotation of type A, if present.
inherited
getAnnotations<A>() → List<A>
Returns a list of annotations of type A.
inherited
getIsStale() → bool
Returns whether this pod definition is stale.
inherited
getPodExpression() → Object?
Returns the PodExpression representing this pod’s creation logic.
inherited
hasAnnotation<A>() → bool
Returns true if this definition has an annotation of type A.
inherited
hasConstructorArgumentValues() → bool
Returns whether this pod definition contains any constructor argument values.
inherited
hasDestroyMethod(String methodName) → bool
Checks whether this pod definition defines a destroy method with the given methodName.
inherited
hasPreferredConstructors() → bool
Returns whether this pod definition has any preferred constructors.
inherited
hasPropertyValues() → bool
Returns whether this pod definition contains any property values.
inherited
isAbstractAndNoFactory() → bool
Returns true if this definition is non-instantiable.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setIsStale(bool value) → void
Marks this pod definition as stale or not.
inherited
setPodExpression(Object podExpression) → void
Attaches a PodExpression representing this pod’s creation logic.
inherited
toString() → String
A string representation of this object.
inherited
toStringOptions() → ToStringOptions
inherited

Operators

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