return typeVarRef;
}
+ // TODO: Fix for Groovy's model-checking
@MJI
public int getGenericSuperclass____Ljava_lang_reflect_Type_2 (MJIEnv env, int robj){
ClassInfo ci = env.getReferredClassInfo( robj);
return aRef;
}
+
+ @MJI
+ public int getProtectionDomain____Ljava_security_ProtectionDomain_2 (MJIEnv env, int robj) {
+ // Now create a ProtectionDomain object
+ ClassLoaderInfo cli = env.getSystemClassLoaderInfo();
+ ClassInfo pdci = cli.getResolvedClassInfo("java.security.ProtectionDomain");
+
+ int proDomRef = MJIEnv.NULL;
+ /* TODO: Defer the following to future implementations
+ int proDomRef = env.newObject(pdci);
+ ElementInfo ei = env.getModifiableElementInfo(proDomRef);
+ ei.setReferenceField("codesource", MJIEnv.NULL);
+ ei.setReferenceField("classloader", MJIEnv.NULL);
+ ei.setBooleanField("hasAllPerm", true);
+ ei.setBooleanField("staticPermissions", true);
+
+ // Load the Permission (AllPermission class)
+ ClassInfo pci = cli.getResolvedClassInfo("java.security.AllPermission");
+ int permRef = env.newObject(pci);
+ ElementInfo pei = env.getModifiableElementInfo(permRef);
+ pei.setReferenceField("name", env.newString("<all permissions>"));
+ ei.setReferenceField("permissions", permRef);*/
+
+ return proDomRef;
+ }
+ // TODO: Fix for Groovy's model-checking
@MJI
public int getAnnotation__Ljava_lang_Class_2__Ljava_lang_annotation_Annotation_2 (MJIEnv env, int robj,