Package org.drools.core.rule
Class DialectRuntimeRegistry
- java.lang.Object
-
- org.drools.core.rule.DialectRuntimeRegistry
-
- All Implemented Interfaces:
Externalizable
,Serializable
public class DialectRuntimeRegistry extends Object implements Externalizable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DialectRuntimeRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
DialectRuntimeData
getDialectData(String dialect)
Map<String,LineMappings>
getLineMappings()
LineMappings
getLineMappings(String className)
void
merge(DialectRuntimeRegistry newDatas, ClassLoader rootClassLoader)
void
merge(DialectRuntimeRegistry newDatas, ClassLoader rootClassLoader, boolean excludeClasses)
void
onAdd(ClassLoader rootClassLoader)
void
onBeforeExecute()
void
onRemove()
void
readExternal(ObjectInput stream)
Handles the read serialization of the PackageCompilationData.DialectRuntimeData
removeFunction(KnowledgePackageImpl pkg, Function function)
void
removeRule(KnowledgePackageImpl pkg, RuleImpl rule)
void
setDialectData(String name, DialectRuntimeData data)
void
writeExternal(ObjectOutput stream)
Handles the write serialization of the PackageCompilationData.
-
-
-
Method Detail
-
writeExternal
public void writeExternal(ObjectOutput stream) throws IOException
Handles the write serialization of the PackageCompilationData. Patterns in Rules may reference generated data which cannot be serialized by default methods. The PackageCompilationData holds a reference to the generated bytecode. The generated bytecode must be restored before any Rules.- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput stream) throws IOException, ClassNotFoundException
Handles the read serialization of the PackageCompilationData. Patterns in Rules may reference generated data which cannot be serialized by default methods. The PackageCompilationData holds a reference to the generated bytecode; which must be restored before any Rules. A custom ObjectInputStream, able to resolve classes against the bytecode, is used to restore the Rules.- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
onAdd
public void onAdd(ClassLoader rootClassLoader)
-
onRemove
public void onRemove()
-
setDialectData
public void setDialectData(String name, DialectRuntimeData data)
-
getDialectData
public DialectRuntimeData getDialectData(String dialect)
-
removeRule
public void removeRule(KnowledgePackageImpl pkg, RuleImpl rule)
-
removeFunction
public DialectRuntimeData removeFunction(KnowledgePackageImpl pkg, Function function)
-
merge
public void merge(DialectRuntimeRegistry newDatas, ClassLoader rootClassLoader)
-
merge
public void merge(DialectRuntimeRegistry newDatas, ClassLoader rootClassLoader, boolean excludeClasses)
-
onBeforeExecute
public void onBeforeExecute()
-
clear
public void clear()
-
getLineMappings
public LineMappings getLineMappings(String className)
-
getLineMappings
public Map<String,LineMappings> getLineMappings()
-
-