本文整理汇总了Java中net.sf.oval.constraint.Assert类的典型用法代码示例。如果您正苦于以下问题:Java Assert类的具体用法?Java Assert怎么用?Java Assert使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Assert类属于net.sf.oval.constraint包,在下文中一共展示了Assert类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: increase
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Pre(expr = "_this.value!=null && value2add!=null && _args[0]!=null", lang = "ognl", message = "PRE")
@Post(expr = "_this.value>_old.value", old = "#{\"value\":_this.value}", lang = "ognl", message = "POST")
public void increase(@Assert(expr = "_value!=null", lang = "ognl", message = "ASSERT") final BigDecimal value2add) {
if (buggyMode)
value = value.subtract(value2add);
else
value = value.add(value2add);
}
示例2: increase
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Pre(expr = "_this.value!=null && value2add!=null && _args[0]!=null", lang = "js", message = "PRE")
@Post(expr = "_this.value>_old", old = "_this.value", lang = "javascript", message = "POST")
public void increase(@Assert(expr = "_value!=null", lang = "js", message = "ASSERT") final BigDecimal value2add) {
if (buggyMode)
value = value.subtract(value2add);
else
value = value.add(value2add);
}
示例3: increase
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Pre(expr = "_this.value!=null && value2add!=null && _args[0]!=null", lang = "bsh", message = "PRE")
@Post(expr = "_this.value.longValue()>_old.longValue()", old = "_this.value", lang = "beanshell", message = "POST")
public void increase(@Assert(expr = "_value!=null", lang = "bsh", message = "ASSERT") final BigDecimal value2add) {
if (buggyMode)
value = value.subtract(value2add);
else
value = value.add(value2add);
}
示例4: increase
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Pre(expr = "_this.value!=null && value2add!=null && _args[0]!=null", lang = "jexl", message = "PRE")
@Post(expr = "_this.value>_old.value", old = "{\"value\" : _this.value}", lang = "jexl", message = "POST")
public void increase(@Assert(expr = "_value!=null", lang = "jexl", message = "ASSERT") final BigDecimal value2add) {
if (buggyMode)
value = value.subtract(value2add);
else
value = value.add(value2add);
}
示例5: increase
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Pre(expr = "_this.value!=null && value2add!=null && _args[0]!=null", lang = "groovy", message = "PRE")
@Post(expr = "_this.value>_old.value", old = "[value:_this.value]", lang = "groovy", message = "POST")
public void increase(@Assert(expr = "_value!=null", lang = "groovy", message = "ASSERT") final BigDecimal value2add) {
if (buggyMode)
value = value.subtract(value2add);
else
value = value.add(value2add);
}
示例6: increase
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Pre(expr = "!_this.value.nil? && !value2add.nil? && !_args[0].nil?", lang = "ruby", message = "PRE")
@Post(expr = "_this.value>_old['value']", old = "{ 'value' => _this.value }", lang = "ruby", message = "POST")
public void increase(@Assert(expr = "!_value.nil?", lang = "ruby", message = "ASSERT") final BigDecimal value2add) {
if (buggyMode)
value = value.subtract(value2add);
else
value = value.add(value2add);
}
示例7: increase
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Pre(expr = "_this.value!=null && value2add!=null && _args[0]!=null", lang = "mvel", message = "PRE")
@Post(expr = "_this.value>_old.value", old = "[\"value\":_this.value]", lang = "mvel", message = "POST")
public void increase(@Assert(expr = "_value!=null", lang = "mvel", message = "ASSERT") final BigDecimal value2add) {
if (buggyMode)
value = value.subtract(value2add);
else
value = value.add(value2add);
}
示例8: getName
import net.sf.oval.constraint.Assert; //导入依赖的package包/类
@Assert(expr = "_this.name != null", lang = "bsh", message = "NOT_NULL")
@Length(max = 4, message = "LENGTH")
public String getName() {
return name;
}