Invariant inv = (Invariant)AnnotationElement.getAnyAnnotation(clazz, Invariant.class);
if (inv != null)
{
if (DesignByContractAspect.verbose) System.out.println("[dbc] Found non-static invariants in class: " + clazz);
String[] exprs = inv.value();
if (exprs != null)
{
for (int i = 0 ; i < exprs.length ; i++)
{
conditions.add(new InvariantCondition(clazz, exprs[i], false));
}
}
}
StaticInvariant statinv = (StaticInvariant)AnnotationElement.getAnyAnnotation(clazz, StaticInvariant.class);
if (statinv != null)
{
if (DesignByContractAspect.verbose) System.out.println("[dbc] Found static invariants in class: " + clazz);
String[] exprs = statinv.value();
if (exprs != null)
{
for (int i = 0 ; i < exprs.length ; i++)
{
conditions.add(new InvariantCondition(clazz, exprs[i], true));
}
}
}