|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.nabla.algorithmic.forward.analysis.ClassDifferentiator
public class ClassDifferentiator
Visitor (in asm sense) for differentiating classes.
This visitor visits classes implementing the
UnivariateDifferentiable
interface and convert
them to classes implementing the UnivariateDerivative
interface.
The visitor creates a new class as an inner class of the visited class. Instances of the generated class are therefore automatically bound to their primitive instance which is their directly enclosing instance. As such they have access to the current value of all fields.
The visited class bytecode is not changed at all.
Constructor Summary | |
---|---|
ClassDifferentiator(Set<String> mathClasses,
org.objectweb.asm.ClassVisitor generator)
Simple constructor. |
Method Summary | |
---|---|
String |
getDerivativeClassName()
Get the name of the derivative class. |
void |
reportErrors()
Report the errors that may have occurred during analysis. |
void |
visit(int version,
int access,
String name,
String signature,
String superName,
String[] interfaces)
|
org.objectweb.asm.AnnotationVisitor |
visitAnnotation(String desc,
boolean visible)
|
void |
visitAttribute(org.objectweb.asm.Attribute attr)
|
void |
visitEnd()
|
org.objectweb.asm.FieldVisitor |
visitField(int access,
String name,
String desc,
String signature,
Object value)
|
void |
visitInnerClass(String name,
String outerName,
String innerName,
int access)
|
org.objectweb.asm.MethodVisitor |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
|
void |
visitOuterClass(String owner,
String name,
String desc)
|
void |
visitSource(String source,
String debug)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassDifferentiator(Set<String> mathClasses, org.objectweb.asm.ClassVisitor generator)
mathClasses
- math implementation classesgenerator
- visitor to which class generation calls will be delegatedMethod Detail |
---|
public String getDerivativeClassName()
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
visit
in interface org.objectweb.asm.ClassVisitor
public org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
visitMethod
in interface org.objectweb.asm.ClassVisitor
public org.objectweb.asm.FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
visitField
in interface org.objectweb.asm.ClassVisitor
public void visitSource(String source, String debug)
visitSource
in interface org.objectweb.asm.ClassVisitor
public void visitOuterClass(String owner, String name, String desc)
visitOuterClass
in interface org.objectweb.asm.ClassVisitor
public org.objectweb.asm.AnnotationVisitor visitAnnotation(String desc, boolean visible)
visitAnnotation
in interface org.objectweb.asm.ClassVisitor
public void visitAttribute(org.objectweb.asm.Attribute attr)
visitAttribute
in interface org.objectweb.asm.ClassVisitor
public void visitInnerClass(String name, String outerName, String innerName, int access)
visitInnerClass
in interface org.objectweb.asm.ClassVisitor
public void visitEnd()
visitEnd
in interface org.objectweb.asm.ClassVisitor
public void reportErrors() throws DifferentiationException
DifferentiationException
- if the derivative class
could not be generated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |