Package repast.simphony.util.bytecode
Class ByteCodeUtilities
java.lang.Object
repast.simphony.util.bytecode.ByteCodeUtilities
- Author:
- Nick Collier Date: Aug 4, 2008 3:55:22 PM
-
Method Summary
Modifier and TypeMethodDescriptioncreateMethodCall
(Method method) Creates a DataSource that will call the specified method.static ByteCodeUtilities
Gets the singleton instance of ByteCodeUtilities.
-
Method Details
-
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
-