Introduction class final
An extra interface that a @DeclareParents field adds to the proxies of
matching beans, with the way to create its implementation.
The generator writes one into the proxy factory of each bean that a
@DeclareParents pattern matches. The generated proxy class implements
interfaceName and forwards its members to the object create
returns, one per proxy, created on first use. Applications never write
it; they declare the @DeclareParents field.
// Generated for: @DeclareParents('*Service+',
// defaultImpl: DefaultUsageTracked) static UsageTracked? mixin;
Introduction(
interfaceName: 'UsageTracked',
aspectType: 'UsageTracking',
create: DefaultUsageTracked.new,
);
Spring (Java):
@DeclareParents(value = "com.x.service.*+",
defaultImpl = DefaultUsageTracked.class)
public static UsageTracked mixin;
Constructors
- Introduction({required String interfaceName, required String aspectType, required Object create()})
-
Describes the interface
interfaceNameintroduced by the aspect namedaspectType;createmakes a new implementation.
Properties
- aspectType → String
-
The aspect declaring it (its
AspectMetadata.typeName). The bean is proxied for the introduction only while that aspect is registered in the context, so a condition or profile can turn it off.final - hashCode → int
-
The hash code for this object.
no setterinherited
- interfaceName → String
-
The simple name of the introduced interface;
this(Name)pointcuts match it.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
create(
) → Object - Creates a new object implementing the interface; the proxy calls it once, on first use.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited