Import class
The Import
annotation in Jetleaf is used to import other configuration classes.
Key Features:
- Import other configuration classes to reuse their pod definitions.
- Import by class type (recommended for type safety).
Usage Example (Import by ClassType):
import 'package:jetleaf/jetleaf.dart';
@Configuration()
@Import([ClassType<DataSourceAutoConfiguration>()])
class AppConfig {
// Import DataSourceAutoConfiguration.
}
In the example, the Import
annotation tells Jetleaf to include the specified
configuration classes, allowing you to reuse their pod definitions and
configurations in your application.
- Annotations
-
- @Component()
- @Target.new({TargetKind.classType})
Constructors
Properties
- annotationType → Type
-
Returns the annotation _type of this annotation.
no setter
-
classes
→ List<
ClassType< Object> > -
A list of configuration classes to import.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
equalizedProperties(
) → List< Object?> -
Mixin-style contract for value-based equality,
hashCode
, andtoString
. -
equals(
Object other) → bool -
Checks whether the given object is logically equivalent to this annotation.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String - Returns a string representation of this annotation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited