Package repast.simphony.engine.watcher
Class WatcheeInstrumentor
java.lang.Object
repast.simphony.engine.watcher.WatcheeInstrumentor
Instruments watchee classes to add the watcher notification mechanism.
- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldToWatch
(String className, String fieldName) Adds the named field in the named class as a field to watch.void
Adds fields to watch from any @Watch annotations on any class that this finds in the specified path.void
instrument
(String classpath) Instrument the fields and classes as Watchees searching the boot classpath as well as the specified classpath.void
instrument
(String classpath, Filter<String> filter) Instrument the watched classes.boolean
isInstrumented
(String className) Gets whether or not the named class has been instrumented as a Watchee.
-
Constructor Details
-
WatcheeInstrumentor
public WatcheeInstrumentor()
-
-
Method Details
-
addFieldToWatch
Adds the named field in the named class as a field to watch.- Parameters:
className
- the field's classfieldName
- the field to watch
-
addFieldToWatchFromWatcherPath
Adds fields to watch from any @Watch annotations on any class that this finds in the specified path. The path can be a top level class directory of classes or a jar file.- Parameters:
path
-
-
instrument
Instrument the fields and classes as Watchees searching the boot classpath as well as the specified classpath.- Parameters:
classpath
-
-
instrument
Instrument the watched classes. The watched classes are those derived from @Watch annotation found on the added paths set in addFieldtoWatchFromWatcherPaths, and any classes or classes and fields explicitly set in the other add methods. Only classes that pass the filter will be queried for the @Watch annotation.- Parameters:
classpath
- the classpath to search for the classes to instrumentfilter
-
-
isInstrumented
Gets whether or not the named class has been instrumented as a Watchee.- Parameters:
className
-- Returns:
- whether or not the named class has been instrumented as a Watchee.
-
getInstrumented
-