@Target(value=FIELD) @Retention(value=RUNTIME) public @interface link
@link
to automatically transfer calls on unimplemented interface methods to fields in the same class.
@part
part
classes (solves the Self problem)
class MyClass implements MyInterface {
@link MyInterface myInterface; // transfers calls on MyInterface to myInterface
public MyClass(MyInterface myInterface) {
this.myInterface = myInterface; // dynamically configure behavior
}
}
public abstract Class<?>[] value
public abstract boolean share
Copyright © 2024. All rights reserved.