com.uwyn.rife.instrument
Class ClassInterfaceDetector
java.lang.Object
com.uwyn.rife.instrument.ClassInterfaceDetector
- Direct Known Subclasses:
- ContinuableDetector, ElementDetector
public class ClassInterfaceDetector
- extends Object
Detects whether a class implements a particular interface by analyzing the
bytecode instead of loading the class and performing reflection calls.
- Since:
- 1.6
- Version:
- $Revision: 3815 $
- Author:
- Geert Bevin (gbevin[remove] at uwyn dot com)
|
Method Summary |
boolean |
detect(byte[] bytes,
boolean doAutoReload)
Perform the detection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassInterfaceDetector
public ClassInterfaceDetector(ClassBytesProvider bytesProvider,
String internalInterfaceNameInterned)
- Creates a new instance of the interface detector.
- Parameters:
bytesProvider - the bytecode provider that will be used to load the
bytes of the parent classes or interfacesinternalInterfaceNameInterned - the name of the interface that should
be detected, it should be in the internal bytecode naming format
(/ instead of .) and it should be interned.- Since:
- 1.6
detect
public boolean detect(byte[] bytes,
boolean doAutoReload)
throws ClassNotFoundException
- Perform the detection.
- Parameters:
bytes - the bytecode of the class that is being analyzeddoAutoReload - indicator if the class should be automatically
reloaded after a modification to the sources, in case the
ClassBytesProvider supports this
- Returns:
true if the detection was successful; or
false otherwise
- Throws:
ClassNotFoundException
Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.