Package org.drools.compiler.builder
Interface ResourceProcessor<C extends org.kie.api.internal.assembler.ProcessedResource>
-
- Type Parameters:
C
- The type of the processed resource.
- All Known Implementing Classes:
AbstractResourceProcessor
public interface ResourceProcessor<C extends org.kie.api.internal.assembler.ProcessedResource>
For a given resource, it implements a mechanism to transform such resource in a ProcessedResource. This is the interface of some "compiler" of sort, that translate a Resource into an "executable" representation of some kind, suitable for execution by some existing runtime. In most cases, implementors are expected to just extendAbstractResourceProcessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<? extends org.kie.internal.builder.KnowledgeBuilderError>
getErrors()
Returns any error that have been generated while processing the resource.C
getProcessedResource()
org.kie.api.io.Resource
getResource()
void
process()
Perform the processing of the given resource
-
-
-
Method Detail
-
process
void process()
Perform the processing of the given resource
-
getResource
org.kie.api.io.Resource getResource()
- Returns:
- the resource that is processed by this object
-
getProcessedResource
C getProcessedResource()
- Returns:
- the processed resource or null if there were errors
- Throws:
java.lang.IllegalStateException
- if process() was never called
-
getErrors
java.util.Collection<? extends org.kie.internal.builder.KnowledgeBuilderError> getErrors()
Returns any error that have been generated while processing the resource.- Returns:
- empty if no errors occurred and the resource have been successfully processed
-
-