Package repast.simphony.util.bytecode
Class ByteCodeUtilities
- java.lang.Object
-
- repast.simphony.util.bytecode.ByteCodeUtilities
-
public class ByteCodeUtilities extends Object
- Author:
- Nick Collier Date: Aug 4, 2008 3:55:22 PM
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSource
createMethodCall(Method method)
Creates a DataSource that will call the specified method.static ByteCodeUtilities
getInstance()
Gets the singleton instance of ByteCodeUtilities.
-
-
-
Method Detail
-
getInstance
public static ByteCodeUtilities getInstance()
Gets the singleton instance of ByteCodeUtilities.- Returns:
- the singleton instance of ByteCodeUtilities.
-
createMethodCall
public DataSource createMethodCall(Method method) throws javassist.NotFoundException, javassist.CannotCompileException, IllegalAccessException, InstantiationException
Creates a DataSource that will call the specified method.- Parameters:
method
- the method to adapt as a DataSource.- Returns:
- the created date source.
- Throws:
javassist.NotFoundException
- if the DataSource interface is not foundIllegalArgumentException
- if the specified method cannot be adapted as a DataSource.javassist.CannotCompileException
- if the byte code cannot be compiled.IllegalAccessException
- if there is an error while creating the DataSourceInstantiationException
- if there is an error while creating the DataSource
-
-