List of usage examples for org.apache.commons.jci.readers MemoryResourceReader add
public void add(final String pResourceName, final byte[] pContent)
From source file:org.drools.compiler.PackageBuilder.java
/** * This adds a compile "task" for when the compiler of * semantics (JCI) is called later on with compileAll()\ * which actually does the compiling./*from w ww . jav a 2 s . c om*/ * The ErrorHandler is required to map the errors back to the * element that caused it. */ private void addClassCompileTask(final String className, final String text, final MemoryResourceReader src, ErrorHandler handler) { String fileName = className.replace('.', '/') + ".java"; src.add(fileName, text.getBytes()); this.errorHandlers.put(fileName, handler); this.generatedClassList.add(className); }