if( source.getSubSignature().indexOf( "<init>" ) >= 0 ) {
handleInit(source, scl);
}
Body b = source.retrieveActiveBody();
for( Iterator sIt = b.getUnits().iterator(); sIt.hasNext(); ) {
final Stmt s = (Stmt) sIt.next();
if( s.containsInvokeExpr() ) {
InvokeExpr ie = s.getInvokeExpr();
if( ie.getMethodRef().getSignature().equals( "<java.lang.reflect.Method: java.lang.Object invoke(java.lang.Object,java.lang.Object[])>" ) ) {
reflectionModel.methodInvoke(source,s);
}
if( ie.getMethodRef().getSignature().equals( "<java.lang.Class: java.lang.Object newInstance()>" ) ) {
reflectionModel.classNewInstance(source,s);
}
if( ie.getMethodRef().getSignature().equals( "<java.lang.reflect.Constructor: java.lang.Object newInstance(java.lang.Object[])>" ) ) {
reflectionModel.contructorNewInstance(source, s);
}
if( ie.getMethodRef().getSubSignature() == sigForName ) {
reflectionModel.classForName(source,s);
}
if( ie instanceof StaticInvokeExpr ) {
SootClass cl = ie.getMethodRef().declaringClass();
for (SootMethod clinit : EntryPoints.v().clinitsOf(cl)) {
addEdge( source, s, clinit, Kind.CLINIT );
}
}
}
if( s.containsFieldRef() ) {
FieldRef fr = s.getFieldRef();
if( fr instanceof StaticFieldRef ) {
SootClass cl = fr.getFieldRef().declaringClass();
for (SootMethod clinit : EntryPoints.v().clinitsOf(cl)) {
addEdge( source, s, clinit, Kind.CLINIT );
}