aicas logo Jamaica 3.2 release 6

java.lang.reflect
Class AccessibleObject

java.lang.Object
  extended by java.lang.reflect.AccessibleObject
All Implemented Interfaces:
AnnotatedElement
Direct Known Subclasses:
Constructor, Field, Method

public class AccessibleObject
extends Object
implements AnnotatedElement

AccessibleObject provides an super class for features Field, Method and Constructor that are accessible via reflection.

Since:
1.2

Constructor Summary
protected AccessibleObject()
          Constructor to create an instance of AccessibleObject that is neither a Field, nor a Method nor a Constructor.
 
Method Summary
<T extends Annotation>
T
getAnnotation(Class<T> annotationType)
          getAnnotation NYI: COMMENT: JDK 1.5 method description
 Annotation[] getAnnotations()
          getAnnotations NYI: COMMENT: JDK 1.5 method description
 Annotation[] getDeclaredAnnotations()
          getDeclaredAnnotations NYI: COMMENT: JDK 1.5 method description
 boolean isAccessible()
          isAccessible check if this object is acccessible.
 boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
          isAnnotationPresent NYI: COMMENT: JDK 1.5 method description
static void setAccessible(AccessibleObject[] array, boolean flag)
          setAccessible enables or disables access to an array of accessible object.
 void setAccessible(boolean flag)
          setAccessible enables or disables access to this accessible object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessibleObject

protected AccessibleObject()
Constructor to create an instance of AccessibleObject that is neither a Field, nor a Method nor a Constructor.

Method Detail

setAccessible

public static void setAccessible(AccessibleObject[] array,
                                 boolean flag)
                          throws SecurityException
setAccessible enables or disables access to an array of accessible object.

Parameters:
array - the array
flag - true to enable access, false to disable access.
Throws:
SecurityException - if security manager sm is installed and sm.checkPermission(new ReflectPermission("suppressAccessChecks")) throws this exception or flag is true and the accessibility cannot be changed.

setAccessible

public void setAccessible(boolean flag)
                   throws SecurityException
setAccessible enables or disables access to this accessible object.

Parameters:
flag - true to enable access, false to disable access.
Throws:
SecurityException - if security manager sm is installed and sm.checkPermission(new ReflectPermission("suppressAccessChecks")) throws this exception or flag is true and the accessibility cannot be changed.

isAccessible

public boolean isAccessible()
isAccessible check if this object is acccessible.

Returns:
true iff this is acccessible.

isAnnotationPresent

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
isAnnotationPresent

NYI: COMMENT: JDK 1.5 method description

Specified by:
isAnnotationPresent in interface AnnotatedElement
Parameters:
annotationType -
Returns:
true if an annotation for the specified annotation type is present on this element, else false
Since:
1.5

getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> annotationType)
getAnnotation

NYI: COMMENT: JDK 1.5 method description

Specified by:
getAnnotation in interface AnnotatedElement
Parameters:
annotationType -
Returns:
annotationClass - the Class object corresponding to the annotation type
Since:
1.5

getAnnotations

public Annotation[] getAnnotations()
getAnnotations

NYI: COMMENT: JDK 1.5 method description

Specified by:
getAnnotations in interface AnnotatedElement
Returns:
all annotations present on this element
Since:
1.5

getDeclaredAnnotations

public Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations

NYI: COMMENT: JDK 1.5 method description

Specified by:
getDeclaredAnnotations in interface AnnotatedElement
Returns:
All annotations directly present on this element
Since:
1.5

aicas logo Jamaica 3.2 release 6

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2008 aicas GmbH. All Rights Reserved.