}
public VariableResolver createVariable(String name,
Object value,
Class type) {
VariableResolver vr = getVariableResolver( name );
if ( vr != null && vr.getType() != null ) {
throw new CompileException( "variable already defined within scope: " + vr.getType() + " " + name );
} else {
if ( this.localVariables == null ) {
this.localVariables = new HashMap();
}
addResolver( name,
vr = new LocalVariableResolver( this,
name,
type ) );
vr.setValue( value );
return vr;
}
}