Package org.pjdbc.annotations
Annotation Interface DriverDependency
@Documented
@Retention(RUNTIME)
@Target(TYPE)
@Repeatable(DriverDependencies.class)
public @interface DriverDependency
Declares an external dependency required by a PJDBC proxy driver.
This annotation is repeatable, allowing multiple dependencies to be declared on a single driver class. Dependencies are typically optional Maven artifacts that must be present at runtime for the driver to function.
Example usage:
@DriverCapability(prefix = "hikaricp", description = "HikariCP connection pooling")
@DriverDependency(
groupId = "com.zaxxer",
artifactId = "HikariCP",
version = "5.1.0"
)
public class HikariPoolDriver extends AbstractProxyDriver {
// ...
}
- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe Maven artifact ID of the dependency.The Maven group ID of the dependency. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionA description of why this dependency is needed.booleanWhether this dependency is optional.The recommended version of the dependency.
-
Element Details
-
groupId
String groupIdThe Maven group ID of the dependency.- Returns:
- the group ID (e.g., "com.zaxxer")
-
artifactId
String artifactIdThe Maven artifact ID of the dependency.- Returns:
- the artifact ID (e.g., "HikariCP")
-
version
String versionThe recommended version of the dependency. This is informational and may not reflect the exact version used.- Returns:
- the version (e.g., "5.1.0")
- Default:
""
-
optional
boolean optionalWhether this dependency is optional. Optional dependencies are not required at runtime but enable additional functionality when present.- Returns:
- true if the dependency is optional
- Default:
true
-
description
String descriptionA description of why this dependency is needed.- Returns:
- the dependency description
- Default:
""
-