Initial revision

From-SVN: r26263
This commit is contained in:
Tom Tromey 1999-04-07 14:42:40 +00:00
parent 140fa895c6
commit ee9dd3721b
370 changed files with 173494 additions and 0 deletions

View file

@ -0,0 +1,53 @@
// AccessibleObject.java - Base for reflection objects.
/* Copyright (C) 1998, 1999 Cygnus Solutions
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.lang.reflect;
/**
* @author Tom Tromey <tromey@cygnus.com>
* @date December 12, 1998
*/
/* Written using JDK 1.2 beta docs.
* Status: Believed complete and correct.
*/
public class AccessibleObject
{
protected AccessibleObject ()
{
flag = false;
}
boolean isAccessible ()
{
return flag;
}
static void setAccessible (AccessibleObject[] array, boolean flag)
{
checkPermission ();
for (int i = 0; i < array.length; ++i)
array[i].flag = flag;
}
void setAccessible (boolean flag)
{
checkPermission ();
this.flag = flag;
}
private static final void checkPermission ()
{
SecurityManager sm = System.getSecurityManager();
// FIXME: sm.checkPermission(ReflectPermission ("suppressAccessChecks"))
}
private boolean flag;
}