@Target(value={FIELD,ANNOTATION_TYPE}) public @interface Controller
@Component
public class MyComponent {
// ...
@Controller
private boolean controller;
public void aMethod() {
// Invalidate the instance
controller = false;
}
public void anotherMethod() {
// Validate the instance again
controller = true;
}
}
Copyright © 2006–2023 The Apache Software Foundation. All rights reserved.