property JavaAppletMembers {
// All public access is okay, so no checking is required for public access.
helper checkDeclaredMemberAccess (c: Class) {
violation ("Attempt to access declared member of class " + c);
//! should be like this
}
check RJavaClass.accessDeclaredFields (c: Class),
RJavaClass.accessDeclaredMethods (c: Class),
RJavaClass.accessDeclaredConstructors (c: Class) {
checkDeclaredMemberAccess (c);
}
check RJavaClass.accessDeclaredField (c: Class, field: String) {
checkDeclaredMemberAccess (c);
}
check RJavaClass.accessDeclaredMethod (c: Class, method: String, types: java.lang.Class[]) {
checkDeclaredMemberAccess (c);
}
check RJavaClass.accessDeclaredConstructor (c: Class, types: java.lang.Class[]) {
checkDeclaredMemberAccess (c);
}
}
Naccio Home Page
University of Virginia, Computer Science