|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.oval.internal.ClassChecks
public final class ClassChecks
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.
Field Summary | |
---|---|
Map<Constructor<?>,Map<Integer,ParameterChecks>> |
checksForConstructorParameters
checks on constructors' parameter values |
Map<Field,Set<Check>> |
checksForFields
checks on fields' value |
Map<Method,Map<Integer,ParameterChecks>> |
checksForMethodParameters
checks on methods' parameter values |
Map<Method,Set<Check>> |
checksForMethodReturnValues
checks on methods' return value |
Map<Method,Set<PostCheck>> |
checksForMethodsPostExcecution
|
Map<Method,Set<PreCheck>> |
checksForMethodsPreExecution
|
Set<Check> |
checksForObject
compound constraints / object level invariants |
Class<?> |
clazz
|
Set<Field> |
constrainedFields
all non-static fields that have value constraints. |
Set<Method> |
constrainedMethods
all non-static non-void, non-parameterized methods marked as invariant that have return value constraints. |
Set<Field> |
constrainedStaticFields
all non-static fields that have value constraints. |
Set<Method> |
constrainedStaticMethods
all static non-void, non-parameterized methods marked as invariant that have return value constraints. |
boolean |
isCheckInvariants
|
Set<AccessibleObject> |
methodsWithCheckInvariantsPost
|
Set<Method> |
methodsWithCheckInvariantsPre
|
Constructor Summary | |
---|---|
ClassChecks(Class<?> clazz,
ParameterNameResolver parameterNameResolver)
package constructor used by the Validator class |
Method Summary | |
---|---|
void |
addConstructorParameterCheckExclusions(Constructor<?> constructor,
int parameterIndex,
CheckExclusion... exclusions)
adds constraint check exclusions to a constructor parameter |
void |
addConstructorParameterCheckExclusions(Constructor<?> constructor,
int parameterIndex,
Collection<CheckExclusion> exclusions)
adds constraint check exclusions to a constructor parameter |
void |
addConstructorParameterChecks(Constructor<?> constructor,
int parameterIndex,
Check... checks)
adds constraint checks to a constructor parameter |
void |
addConstructorParameterChecks(Constructor<?> constructor,
int parameterIndex,
Collection<Check> checks)
adds constraint checks to a constructor parameter |
void |
addFieldChecks(Field field,
Check... checks)
adds check constraints to a field |
void |
addFieldChecks(Field field,
Collection<Check> checks)
adds check constraints to a field |
void |
addMethodParameterCheckExclusions(Method method,
int parameterIndex,
CheckExclusion... exclusions)
adds constraint check exclusions to a method parameter |
void |
addMethodParameterCheckExclusions(Method method,
int parameterIndex,
Collection<CheckExclusion> exclusions)
adds constraint check exclusions to a method parameter |
void |
addMethodParameterChecks(Method method,
int parameterIndex,
Check... checks)
adds constraint checks to a method parameter |
void |
addMethodParameterChecks(Method method,
int parameterIndex,
Collection<Check> checks)
adds constraint checks to a method parameter |
void |
addMethodPostChecks(Method method,
Collection<PostCheck> checks)
adds constraint checks to a method's return value |
void |
addMethodPostChecks(Method method,
PostCheck... checks)
adds constraint checks to a method's return value |
void |
addMethodPreChecks(Method method,
Collection<PreCheck> checks)
|
void |
addMethodPreChecks(Method method,
PreCheck... checks)
|
void |
addMethodReturnValueChecks(Method method,
Boolean isInvariant,
Check... checks)
adds constraint checks to a method's return value |
void |
addMethodReturnValueChecks(Method method,
Boolean isInvariant,
Collection<Check> checks)
adds constraint checks to a method's return value |
void |
addObjectChecks(Check... checks)
adds check constraints on object level (invariants) |
void |
addObjectChecks(Collection<Check> checks)
adds check constraints on object level (invariants) |
void |
clear()
|
void |
clearConstructorChecks(Constructor<?> constructor)
|
void |
clearConstructorParameterChecks(Constructor<?> constructor)
|
void |
clearConstructorParameterChecks(Constructor<?> constructor,
int parameterIndex)
|
void |
clearFieldChecks(Field field)
|
void |
clearMethodChecks(Method method)
|
void |
clearMethodParameterChecks(Method method)
|
void |
clearMethodParameterChecks(Method method,
int parameterIndex)
|
void |
clearMethodPostChecks(Method method)
|
void |
clearMethodPreChecks(Method method)
|
void |
clearMethodReturnValueChecks(Method method)
|
void |
clearObjectChecks()
|
void |
removeConstructorParameterCheckExclusions(Constructor<?> constructor,
int parameterIndex,
CheckExclusion... exclusions)
|
void |
removeConstructorParameterChecks(Constructor<?> constructor,
int parameterIndex,
Check... checks)
|
void |
removeFieldChecks(Field field,
Check... checks)
|
void |
removeMethodParameterCheckExclusions(Method method,
int parameterIndex,
CheckExclusion... exclusions)
|
void |
removeMethodParameterChecks(Method method,
int parameterIndex,
Check... checks)
|
void |
removeMethodPostChecks(Method method,
PostCheck... checks)
|
void |
removeMethodPreChecks(Method method,
PreCheck... checks)
|
void |
removeMethodReturnValueChecks(Method method,
Check... checks)
|
void |
removeObjectChecks(Check... checks)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Map<Constructor<?>,Map<Integer,ParameterChecks>> checksForConstructorParameters
public final Map<Field,Set<Check>> checksForFields
public final Map<Method,Map<Integer,ParameterChecks>> checksForMethodParameters
public final Map<Method,Set<Check>> checksForMethodReturnValues
public final Map<Method,Set<PostCheck>> checksForMethodsPostExcecution
public final Map<Method,Set<PreCheck>> checksForMethodsPreExecution
public final Set<Check> checksForObject
public final Class<?> clazz
public final Set<Field> constrainedFields
public final Set<Method> constrainedMethods
public final Set<Field> constrainedStaticFields
public final Set<Method> constrainedStaticMethods
public boolean isCheckInvariants
public final Set<AccessibleObject> methodsWithCheckInvariantsPost
public final Set<Method> methodsWithCheckInvariantsPre
Constructor Detail |
---|
public ClassChecks(Class<?> clazz, ParameterNameResolver parameterNameResolver)
clazz
- Method Detail |
---|
public void addConstructorParameterCheckExclusions(Constructor<?> constructor, int parameterIndex, CheckExclusion... exclusions) throws InvalidConfigurationException
constructor
- parameterIndex
- exclusions
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addConstructorParameterCheckExclusions(Constructor<?> constructor, int parameterIndex, Collection<CheckExclusion> exclusions) throws InvalidConfigurationException
constructor
- parameterIndex
- exclusions
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addConstructorParameterChecks(Constructor<?> constructor, int parameterIndex, Check... checks) throws InvalidConfigurationException
constructor
- parameterIndex
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addConstructorParameterChecks(Constructor<?> constructor, int parameterIndex, Collection<Check> checks) throws InvalidConfigurationException
constructor
- parameterIndex
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addFieldChecks(Field field, Check... checks) throws InvalidConfigurationException
field
- checks
-
InvalidConfigurationException
public void addFieldChecks(Field field, Collection<Check> checks) throws InvalidConfigurationException
field
- checks
-
InvalidConfigurationException
public void addMethodParameterCheckExclusions(Method method, int parameterIndex, CheckExclusion... exclusions) throws InvalidConfigurationException
method
- parameterIndex
- exclusions
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodParameterCheckExclusions(Method method, int parameterIndex, Collection<CheckExclusion> exclusions) throws InvalidConfigurationException
method
- parameterIndex
- exclusions
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodParameterChecks(Method method, int parameterIndex, Check... checks) throws InvalidConfigurationException
method
- parameterIndex
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodParameterChecks(Method method, int parameterIndex, Collection<Check> checks) throws InvalidConfigurationException
method
- parameterIndex
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodPostChecks(Method method, Collection<PostCheck> checks) throws InvalidConfigurationException
method
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodPostChecks(Method method, PostCheck... checks) throws InvalidConfigurationException
method
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodPreChecks(Method method, Collection<PreCheck> checks) throws InvalidConfigurationException
method
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodPreChecks(Method method, PreCheck... checks) throws InvalidConfigurationException
method
- checks
-
InvalidConfigurationException
- if the declaring class is not guarded by GuardAspectpublic void addMethodReturnValueChecks(Method method, Boolean isInvariant, Check... checks) throws InvalidConfigurationException
method
- isInvariant
- determines if the return value should be checked when the object is validated, can be nullchecks
-
InvalidConfigurationException
public void addMethodReturnValueChecks(Method method, Boolean isInvariant, Collection<Check> checks) throws InvalidConfigurationException
method
- isInvariant
- determines if the return value should be checked when the object is validated, can be nullchecks
-
InvalidConfigurationException
public void addObjectChecks(Check... checks)
checks
- public void addObjectChecks(Collection<Check> checks)
checks
- public 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 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 removeConstructorParameterCheckExclusions(Constructor<?> constructor, int parameterIndex, CheckExclusion... exclusions)
public void removeConstructorParameterChecks(Constructor<?> constructor, int parameterIndex, Check... checks)
public void removeFieldChecks(Field field, Check... checks)
public void removeMethodParameterCheckExclusions(Method method, int parameterIndex, CheckExclusion... exclusions)
public void removeMethodParameterChecks(Method method, int parameterIndex, Check... checks) throws InvalidConfigurationException
InvalidConfigurationException
public void removeMethodPostChecks(Method method, PostCheck... checks)
public void removeMethodPreChecks(Method method, PreCheck... checks)
public void removeMethodReturnValueChecks(Method method, Check... checks)
public void removeObjectChecks(Check... checks)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |