站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

PackageCompilationData (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.rule
Class PackageCompilationData

java.lang.Object
  extended by org.drools.rule.PackageCompilationData
All Implemented Interfaces:
Externalizable, Serializable

public class PackageCompilationData
extends Object
implements Externalizable

See Also:
Serialized Form

Nested Class Summary
 class PackageCompilationData.PackageClassLoader
          Lifted and adapted from Jakarta commons-jci
 
Constructor Summary
PackageCompilationData()
          Default constructor - for Externalizable.
PackageCompilationData(ClassLoader parentClassLoader)
           
 
Method Summary
 void clear()
           
static String convertClassToResourcePath(String pName)
          Please do not use - internal org.my.Class -> org/my/Class.class
static String convertResourceToClassName(String pResourceName)
          Please do not use - internal org/my/Class.xxx -> org.my.Class
 Object getAST()
           
 ClassLoader getClassLoader()
           
 Map getInvokers()
           
 Map getLineMappings()
           
 LineMappings getLineMappings(String className)
           
 String[] list()
           
 void putAllInvokers(Map invokers)
           
 void putInvoker(String className, Object invoker)
           
 byte[] read(String resourceName)
           
 void readExternal(ObjectInput stream)
          Handles the read serialization of the PackageCompilationData.
 void reload()
          This class drops the classLoader and reloads it.
 void remove(String resourceName)
           
 void removeInvoker(String className)
           
 void setAST(Object ast)
           
 void setLineMappings(Map lineMappings)
           
static String stripExtension(String pResourceName)
          Please do not use - internal org/my/Class.xxx -> org/my/Class
 String toString()
           
 void wire(String className)
           
 void wire(String className, Object invoker)
           
 void write(String resourceName, byte[] clazzData)
           
 void writeExternal(ObjectOutput stream)
          Handles the write serialization of the PackageCompilationData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PackageCompilationData

public PackageCompilationData()
Default constructor - for Externalizable. This should never be used by a user, as it will result in an invalid state for the instance.


PackageCompilationData

public PackageCompilationData(ClassLoader parentClassLoader)
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 interface Externalizable
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 interface Externalizable
Throws:
IOException
ClassNotFoundException

getClassLoader

public ClassLoader getClassLoader()

read

public byte[] read(String resourceName)

write

public void write(String resourceName,
                  byte[] clazzData)
           throws RuntimeDroolsException
Throws:
RuntimeDroolsException

remove

public void remove(String resourceName)
            throws RuntimeDroolsException
Throws:
RuntimeDroolsException

list

public String[] list()

reload

public void reload()
            throws RuntimeDroolsException
This class drops the classLoader and reloads it. During this process it must re-wire all the invokeables.

Throws:
CheckedDroolsException
RuntimeDroolsException

clear

public void clear()

wire

public void wire(String className)
          throws ClassNotFoundException,
                 InstantiationException,
                 IllegalAccessException
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

wire

public void wire(String className,
                 Object invoker)
          throws ClassNotFoundException,
                 InstantiationException,
                 IllegalAccessException
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

toString

public String toString()
Overrides:
toString in class Object

putInvoker

public void putInvoker(String className,
                       Object invoker)

putAllInvokers

public void putAllInvokers(Map invokers)

getInvokers

public Map getInvokers()

removeInvoker

public void removeInvoker(String className)

getLineMappings

public Map getLineMappings()

setLineMappings

public void setLineMappings(Map lineMappings)

getLineMappings

public LineMappings getLineMappings(String className)

getAST

public Object getAST()

setAST

public void setAST(Object ast)

convertResourceToClassName

public static String convertResourceToClassName(String pResourceName)
Please do not use - internal org/my/Class.xxx -> org.my.Class


convertClassToResourcePath

public static String convertClassToResourcePath(String pName)
Please do not use - internal org.my.Class -> org/my/Class.class


stripExtension

public static String stripExtension(String pResourceName)
Please do not use - internal org/my/Class.xxx -> org/my/Class



Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.