net.sf.oval.guard
Annotation Type Guarded


@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Guarded

This annotation needs to be applied to classes where OVal's programming by contract features shall be used.

The GuardAspect will weave the required AOP code into all classes annotated with @Guarded.

Author:
Sebastian Thomschke

Optional Element Summary
 boolean applyFieldConstraintsToConstructors
          Automatically apply field constraints to the corresponding parameters of constructors declared within the same class.
 boolean applyFieldConstraintsToSetters
          Automatically apply field constraints to the single parameter of the corresponding setter methods declared within the same class.
 boolean assertParametersNotNull
          Declares if parameter values of constructors and methods are expected to be not null.
 boolean checkInvariants
          Declares if invariants are automatically checked after constructor execution and prior and after calls to non-private methods.
 boolean inspectInterfaces
          Declares if annotations can be applied to interfaces that this class implements - supporting a documentation function
 

applyFieldConstraintsToConstructors

public abstract boolean applyFieldConstraintsToConstructors
Automatically apply field constraints to the corresponding parameters of constructors declared within the same class. A corresponding parameter is a parameter with the same name and type as the field.

Default:
false

applyFieldConstraintsToSetters

public abstract boolean applyFieldConstraintsToSetters
Automatically apply field constraints to the single parameter of the corresponding setter methods declared within the same class. A corresponding setter method is a method following the JavaBean convention and its parameter has as the same type as the field.

Default:
false

assertParametersNotNull

public abstract boolean assertParametersNotNull
Declares if parameter values of constructors and methods are expected to be not null. This can be weakened by using the @net.sf.oval.constraint.exclusion.Nullable annotation on specific parameters.

Default:
false

checkInvariants

public abstract boolean checkInvariants
Declares if invariants are automatically checked after constructor execution and prior and after calls to non-private methods.

Default:
true

inspectInterfaces

public abstract boolean inspectInterfaces
Declares if annotations can be applied to interfaces that this class implements - supporting a documentation function

Default:
false


Copyright © 2005–2015 The OVal Development Team. All rights reserved.