1 20 21 package net.innig.macker.rule; 22 23 import net.innig.macker.structure.ClassManager; 24 import net.innig.macker.structure.ClassInfo; 25 import net.innig.macker.event.MackerIsMadException; 26 27 import java.util.*; 28 29 public class Variable 30 extends Rule 31 { 32 public Variable(RuleSet parent, String name, String value) 33 { 34 super(parent); 35 setVariableName(name); 36 setValue(value); 37 } 38 39 public String getVariableName() 40 { return variableName; } 41 42 public void setVariableName(String variableName) 43 { this.variableName = variableName; } 44 45 public String getValue() 46 { return value; } 47 48 public void setValue(String value) 49 { this.value = value;} 50 51 public void check( 52 EvaluationContext context, 53 ClassManager classes) 54 throws RulesException, MackerIsMadException 55 { 56 context.setVariableValue(getVariableName(), getValue()); 57 } 58 59 private String variableName, value; 60 } | Popular Tags |