org.drools.compiler.BoundIdentifiers Maven / Gradle / Ivy
package org.drools.compiler;
import java.util.Collections;
import java.util.Map;
import org.drools.base.EvaluatorWrapper;
import org.drools.rule.Declaration;
public class BoundIdentifiers {
private Map declarations;
private Map> declrClasses;
private Map> globals;
private Map operators;
private Class< ? > thisClass;
public BoundIdentifiers(Map> declarations,
Map> globals) {
this( declarations,
globals,
null,
null );
}
public BoundIdentifiers(Map> declarations,
Map> globals,
Map operators) {
this( declarations,
globals,
operators,
null );
}
public BoundIdentifiers(Map> declarations,
Map> globals,
Map operators,
Class< ? > thisClass) {
this.declrClasses = declarations;
this.globals = globals;
this.operators = operators;
this.thisClass = thisClass;
}
public Map> getDeclrClasses() {
return declrClasses;
}
public Map> getGlobals() {
return globals;
}
@SuppressWarnings("unchecked")
public Map getOperators() {
return operators != null ? operators : Collections.EMPTY_MAP;
}
public Class< ? > getThisClass() {
return thisClass;
}
public String toString() {
StringBuilder sbuilder = new StringBuilder();
sbuilder.append( "thisClass: " + thisClass + "\n" );
sbuilder.append( "declarations:" + declrClasses + "\n" );
sbuilder.append( "globals:" + globals + "\n" );
sbuilder.append( "operators:" + operators + "\n" );
return sbuilder.toString();
}
public void setDeclarations(Map declarations) {
this.declarations = declarations;
}
public Map getDeclarations() {
return this.declarations;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy