AbstractPodDefinition class abstract

An abstract base class for pod definitions that extends PodDefinition.

AbstractPodDefinition adds mutable state and utility methods to support advanced features such as:

  • Tracking whether a pod definition is stale
  • Marking whether a pod is a provider (factory) of other pods
  • Attaching a PodExpression to represent its creation logic
  • Checking whether lifecycle methods like destroy exist

Typically, concrete pod definitions (e.g., RootPodDefinition) extend this class to customize behavior while leveraging the shared mutability features.

Example

class RootPodDefinition extends AbstractPodDefinition {
  RootPodDefinition() : super(name: "root", type: Class<OtherService>());
}

final rootDef = RootPodDefinition();
rootDef.setIsStale(true);

if (rootDef.getIsStale()) {
  print("Pod definition needs re-evaluation");
}

rootDef.setIsPodProvider(true);
print(rootDef.getIsPodProvider()); // true
Inheritance
Implementers

Constructors

AbstractPodDefinition({required Class type, Object? instance, String? resolvedDestroyMethodName})
Creates an AbstractPodDefinition with a given name and type.

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
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
instance Object?
The instance of the pod definition.
getter/setter pair
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 pair
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.
inherited
equalizedProperties() List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
override
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.
getPodExpression() Object?
Returns the PodExpression representing this pod’s creation logic.
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.
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.
setPodExpression(Object podExpression) → void
Attaches a PodExpression representing this pod’s creation logic.
toString() String
A string representation of this object.
inherited
toStringOptions() → ToStringOptions
override

Operators

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