property JavaClasses {
helper checkMemberAccess (c: Class, kind: int) {
SecurityManager security = getSecurityManager ();
if (security != null) {
security.checkMemberAccess (c, kind);
}
}
check RJavaClass.accessPublicFields (c: Class),
RJavaClass.accessPublicMethods (c: Class),
RJavaClass.accessPublicConstructors (c: Class) {
checkMemberAccess (c, java.lang.reflect.Member.PUBLIC);
}
check RJavaClass.accessPublicField (c: Class, field: String) {
checkMemberAccess (c, java.lang.reflect.Member.PUBLIC);
}
check RJavaClass.accessPublicMethod (c: Class, method: String, types: java.lang.Class[]) {
checkMemberAccess (c, java.lang.reflect.Member.PUBLIC);
}
check RJavaClass.accessPublicConstructor (c: Class, types: java.lang.Class[]) {
checkMemberAccess (c, java.lang.reflect.Member.PUBLIC);
}
check RJavaClass.accessDeclaredFields (c: Class),
RJavaClass.accessDeclaredMethods (c: Class),
RJavaClass.accessDeclaredConstructors (c: Class) {
checkMemberAccess (c, java.lang.reflect.Member.DECLARED);
}
check RJavaClass.accessDeclaredField (c: Class, field: String) {
checkMemberAccess (c, java.lang.reflect.Member.DECLARED);
}
check RJavaClass.accessDeclaredMethod (c: Class, method: String, types: java.lang.Class[]) {
checkMemberAccess (c, java.lang.reflect.Member.DECLARED);
}
check RJavaClass.accessDeclaredConstructor (c: Class, types: java.lang.Class[]) {
checkMemberAccess (c, java.lang.reflect.Member.DECLARED);
}
check RJavaClass.createClassLoader () {
SecurityManager security = getSecurityManager ();
if (security != null) {
security.checkCreateClassLoader ();
}
}
}
Naccio Home Page
University of Virginia, Computer Science