@Documented @Retention(value=RUNTIME) @Target(value=TYPE) public @interface ResolveWith
StandardUsernamePasswordCredentials, and existing legacy
implementations of corresponding credential types should be using readResolve() to map down to that
interface.
But what happens to legacy code that is looking for the legacy type? By annotating the legacy type with
ResolveWith we can provide the legacy code with the credentials it seeks while migrating those legacy
types to the common parent. For example
public class SSHUserPassCredential {
// ...
@Extension
public static class DescriptorImpl extends CredentialsDescriptor {
// ...
}
}
should be transformed into
@ResolveWith(SSHUserPassCredentials.ResolverImpl.class)
public class SSHUserPassCredential implements StandardUsernamePasswordCredentials {
// ...
public static class ResolverImpl extends CredentialsResolver {
// ...
}
}
| Modifier and Type | Required Element and Description |
|---|---|
Class<? extends CredentialsResolver> |
value
The
CredentialsResolver to use for the annotated class. |
public abstract Class<? extends CredentialsResolver> value
CredentialsResolver to use for the annotated class.CredentialsResolver to use for the annotated class.Copyright © 2016–2018. All rights reserved.