Annotation Interface Secured
Compile-time trigger for the
security-processor annotation
processor. Marks a concrete class (not an interface) for which an
auto-generated <Type>Secured wrapper subclass shall be emitted
during compilation. The generated wrapper overrides every public,
non-final, non-static method of the original and inserts a
JSentinelEnforcer
call ahead of the super.<method>(...) delegate when the method
(or the class) carries one of the method-security annotations:
This annotation itself does not trigger
runtime enforcement and carries no JSentinelAnnotation
meta-binding. It is consumed at compile time only — retention is
RetentionPolicy.SOURCE so the marker does not appear in
the class file.
For runtime-only enforcement via java.lang.reflect.Proxy
(interfaces) use
com.svenruppert.jsentinel.standalone.SecuredProxy.wrap(...)
instead — that path requires neither this annotation nor the
annotation processor.
Constraints checked by the annotation processor:
- The annotated type must not be
final(the wrapper extends it). - Methods to be guarded must be
public, non-final and non-static. Method-security annotations onfinal,privateorstaticmethods raise a compile error. Objectmethods (equals,hashCode,toString,finalize) are not wrapped.