Package org.drools.base.rule
Class DialectRuntimeRegistry
- java.lang.Object
-
- org.drools.base.rule.DialectRuntimeRegistry
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
public class DialectRuntimeRegistry extends java.lang.Object implements java.io.Externalizable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DialectRuntimeRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()DialectRuntimeDatagetDialectData(java.lang.String dialect)java.util.Map<java.lang.String,LineMappings>getLineMappings()LineMappingsgetLineMappings(java.lang.String className)voidmerge(DialectRuntimeRegistry newDatas, java.lang.ClassLoader rootClassLoader)voidmerge(DialectRuntimeRegistry newDatas, java.lang.ClassLoader rootClassLoader, boolean excludeClasses)voidonAdd(java.lang.ClassLoader rootClassLoader)voidonBeforeExecute()voidonRemove()voidreadExternal(java.io.ObjectInput stream)Handles the read serialization of the PackageCompilationData.DialectRuntimeDataremoveFunction(KnowledgePackageImpl pkg, Function function)voidremoveRule(KnowledgePackageImpl pkg, RuleImpl rule)voidsetDialectData(java.lang.String name, DialectRuntimeData data)voidwriteExternal(java.io.ObjectOutput stream)Handles the write serialization of the PackageCompilationData.
-
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput stream) throws java.io.IOExceptionHandles 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:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput stream) throws java.io.IOException, java.lang.ClassNotFoundExceptionHandles 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:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
onAdd
public void onAdd(java.lang.ClassLoader rootClassLoader)
-
onRemove
public void onRemove()
-
setDialectData
public void setDialectData(java.lang.String name, DialectRuntimeData data)
-
getDialectData
public DialectRuntimeData getDialectData(java.lang.String dialect)
-
removeRule
public void removeRule(KnowledgePackageImpl pkg, RuleImpl rule)
-
removeFunction
public DialectRuntimeData removeFunction(KnowledgePackageImpl pkg, Function function)
-
merge
public void merge(DialectRuntimeRegistry newDatas, java.lang.ClassLoader rootClassLoader)
-
merge
public void merge(DialectRuntimeRegistry newDatas, java.lang.ClassLoader rootClassLoader, boolean excludeClasses)
-
onBeforeExecute
public void onBeforeExecute()
-
clear
public void clear()
-
getLineMappings
public LineMappings getLineMappings(java.lang.String className)
-
getLineMappings
public java.util.Map<java.lang.String,LineMappings> getLineMappings()
-
-