| java.lang.Object net.sf.oval.internal.ClassChecks
ClassChecks | public class ClassChecks (Code) | | This class holds the instantiated checks for a single class.
Note: For performance reasons the collections are made public (intended for read-access only).
Modifications to the collections should be done through the appropriate methods addXXX, removeXXX, clearXXX methods.
author: Sebastian Thomschke |
Field Summary | |
final public Map<Constructor, Map<Integer, Set<Check>>> | checksForConstructorParameters | final public Map<Field, Set<Check>> | checksForFields | final public Map<Method, Map<Integer, Set<Check>>> | checksForMethodParameters | final public Map<Method, Set<Check>> | checksForMethodReturnValues | final public Map<Method, Set<PostCheck>> | checksForMethodsPostExcecution | final public Map<Method, Set<PreCheck>> | checksForMethodsPreExecution | final public Set<Check> | checksForObject | final public Class | clazz | final public Set<Field> | constrainedFields all non-static fields that have value constraints. | final public Set<Method> | constrainedMethods all non-static non-void, non-parameterized methods marked as invariant that have return value constraints. | final public Set<Field> | constrainedStaticFields all non-static fields that have value constraints. | final public Set<Method> | constrainedStaticMethods all static non-void, non-parameterized methods marked as invariant that have return value constraints. | public boolean | isCheckInvariants | final public boolean | isGuarded | final public Set<AccessibleObject> | methodsWithCheckInvariantsPost | final public Set<Method> | methodsWithCheckInvariantsPre |
Method Summary | |
public void | addConstructorParameterChecks(Constructor constructor, int parameterIndex, Check... checks) | public void | addConstructorParameterChecks(Constructor constructor, int parameterIndex, Collection<Check> checks) | public void | addFieldChecks(Field field, Check... checks) | public void | addFieldChecks(Field field, Collection<Check> checks) | public void | addMethodParameterChecks(Method method, int parameterIndex, Check... checks) | public void | addMethodParameterChecks(Method method, int parameterIndex, Collection<Check> checks) | public void | addMethodPostChecks(Method method, Collection<PostCheck> checks) | public void | addMethodPostChecks(Method method, PostCheck... checks) | public void | addMethodPreChecks(Method method, Collection<PreCheck> checks) | public void | addMethodPreChecks(Method method, PreCheck... checks) | public void | addMethodReturnValueChecks(Method method, Boolean isInvariant, Check... checks) | public void | addMethodReturnValueChecks(Method method, Boolean isInvariant, Collection<Check> checks) | public void | addObjectChecks(Check... checks) | public void | addObjectChecks(Collection<Check> checks) | public synchronized void | clear() | public void | clearConstructorChecks(Constructor constructor) | public void | clearConstructorParameterChecks(Constructor constructor) | public void | clearConstructorParameterChecks(Constructor constructor, int parameterIndex) | public void | clearFieldChecks(Field field) | public synchronized void | clearMethodChecks(Method method) | public void | clearMethodParameterChecks(Method method) | public void | clearMethodParameterChecks(Method method, int parameterIndex) | public void | clearMethodPostChecks(Method method) | public void | clearMethodPreChecks(Method method) | public void | clearMethodReturnValueChecks(Method method) | public void | clearObjectChecks() | public void | removeConstructorParameterChecks(Constructor constructor, int parameterIndex, Check... checks) | public void | removeFieldChecks(Field field, Check... checks) | public void | removeMethodChecks(Method method, Check... checks) | public void | removeMethodParameterChecks(Method method, int parameterIndex, Check... checks) | public void | removeMethodPostChecks(Method method, PostCheck... checks) | public void | removeMethodPreChecks(Method method, PreCheck... checks) | public void | removeObjectChecks(Check... checks) |
checksForMethodReturnValues | final public Map<Method, Set<Check>> checksForMethodReturnValues(Code) | | checks on methods' return value
|
checksForObject | final public Set<Check> checksForObject(Code) | | compound constraints / object level invariants
|
constrainedFields | final public Set<Field> constrainedFields(Code) | | all non-static fields that have value constraints.
Validator loops over this set during validation.
|
constrainedMethods | final public Set<Method> constrainedMethods(Code) | | all non-static non-void, non-parameterized methods marked as invariant that have return value constraints.
Validator loops over this set during validation.
|
constrainedStaticFields | final public Set<Field> constrainedStaticFields(Code) | | all non-static fields that have value constraints.
Validator loops over this set during validation.
|
constrainedStaticMethods | final public Set<Method> constrainedStaticMethods(Code) | | all static non-void, non-parameterized methods marked as invariant that have return value constraints.
Validator loops over this set during validation.
|
isCheckInvariants | public boolean isCheckInvariants(Code) | | |
isGuarded | final public boolean isGuarded(Code) | | |
methodsWithCheckInvariantsPre | final public Set<Method> methodsWithCheckInvariantsPre(Code) | | |
ClassChecks | public ClassChecks(Class clazz)(Code) | | package constructor used by the Validator class
Parameters: clazz - |
addMethodReturnValueChecks | public void addMethodReturnValueChecks(Method method, Boolean isInvariant, Check... checks) throws InvalidConfigurationException(Code) | | adds constraint checks to a method's return value
Parameters: method - Parameters: isInvariant - determines if the return value should be checked when the object is validated, can be null Parameters: checks - |
addMethodReturnValueChecks | public void addMethodReturnValueChecks(Method method, Boolean isInvariant, Collection<Check> checks) throws InvalidConfigurationException(Code) | | adds constraint checks to a method's return value
Parameters: method - Parameters: isInvariant - determines if the return value should be checked when the object is validated, can be null Parameters: checks - |
addObjectChecks | public void addObjectChecks(Check... checks)(Code) | | adds check constraints on object level (invariants)
Parameters: checks - |
addObjectChecks | public void addObjectChecks(Collection<Check> checks)(Code) | | adds check constraints on object level (invariants)
Parameters: checks - |
clear | public synchronized void clear()(Code) | | |
clearConstructorChecks | public void clearConstructorChecks(Constructor constructor)(Code) | | |
clearConstructorParameterChecks | public void clearConstructorParameterChecks(Constructor constructor)(Code) | | |
clearConstructorParameterChecks | public void clearConstructorParameterChecks(Constructor constructor, int parameterIndex)(Code) | | |
clearFieldChecks | public void clearFieldChecks(Field field)(Code) | | |
clearMethodChecks | public synchronized void clearMethodChecks(Method method)(Code) | | |
clearMethodParameterChecks | public void clearMethodParameterChecks(Method method)(Code) | | |
clearMethodParameterChecks | public void clearMethodParameterChecks(Method method, int parameterIndex)(Code) | | |
clearMethodPostChecks | public void clearMethodPostChecks(Method method)(Code) | | |
clearMethodPreChecks | public void clearMethodPreChecks(Method method)(Code) | | |
clearMethodReturnValueChecks | public void clearMethodReturnValueChecks(Method method)(Code) | | |
clearObjectChecks | public void clearObjectChecks()(Code) | | |
removeConstructorParameterChecks | public void removeConstructorParameterChecks(Constructor constructor, int parameterIndex, Check... checks)(Code) | | |
removeFieldChecks | public void removeFieldChecks(Field field, Check... checks)(Code) | | |
removeMethodChecks | public void removeMethodChecks(Method method, Check... checks)(Code) | | |
removeObjectChecks | public void removeObjectChecks(Check... checks)(Code) | | |
|
|