IT. Expert System.

Android Reference

AccessibleObject


java.lang.reflect

Class AccessibleObject

  • All Implemented Interfaces:
    AnnotatedElement
    Direct Known Subclasses:
    Constructor, Field, Method


    public class AccessibleObject
    extends Object
    implements AnnotatedElement
    AccessibleObject is the superclass of all member reflection classes (Field, Constructor, Method). AccessibleObject provides the ability to toggle a flag controlling access checks for these objects. By default, accessing a member (for example, setting a field or invoking a method) checks the validity of the access (for example, invoking a private method from outside the defining class is prohibited) and throws IllegalAccessException if the operation is not permitted. If the accessible flag is set to true, these checks are omitted. This allows privileged code, such as Java object serialization, object inspectors, and debuggers to have complete access to objects.
    See Also:
    Field, Constructor, Method
    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected AccessibleObject()
      Constructs a new AccessibleObject instance.
    • Constructor Detail

      • AccessibleObject

        protected AccessibleObject()
        Constructs a new AccessibleObject instance. AccessibleObject instances can only be constructed by the virtual machine.
    • Method Detail

      • setAccessible

        public static void setAccessible(AccessibleObject[] objects,
                         boolean flag)
        Attempts to set the value of the accessible flag for all the objects in the array provided. Setting this flag to false will enable access checks, setting to true will disable them.
        Parameters:
        objects - the accessible objects
        flag - the new value for the accessible flag
        See Also:
        setAccessible(boolean)
      • isAccessible

        public boolean isAccessible()
        Indicates whether this object is accessible without access checks being performed. Returns the accessible flag.
        Returns:
        true if this object is accessible without access checks, false otherwise
      • setAccessible

        public void setAccessible(boolean flag)
        Attempts to set the value of the accessible flag. Setting this flag to false will enable access checks, setting to true will disable them.
        Parameters:
        flag - the new value for the accessible flag
      • isAnnotationPresent

        public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
        Description copied from interface: AnnotatedElement
        Indicates whether or not this element has an annotation with the specified annotation type (including inherited annotations).
        Specified by:
        isAnnotationPresent in interface AnnotatedElement
        Parameters:
        annotationType - the type of the annotation to search for
        Returns:
        true if the annotation exists, false otherwise
      • getDeclaredAnnotations

        public Annotation[] getDeclaredAnnotations()
        Description copied from interface: AnnotatedElement
        Returns, for this element, all annotations that are explicitly declared (not inherited). If there are no declared annotations present, this method returns a zero length array.
        Specified by:
        getDeclaredAnnotations in interface AnnotatedElement
        Returns:
        an array of annotations declared for this element
      • getAnnotations

        public Annotation[] getAnnotations()
        Description copied from interface: AnnotatedElement
        Returns, for this element, an array containing all annotations (including inherited annotations). If there are no annotations present, this method returns a zero length array.
        Specified by:
        getAnnotations in interface AnnotatedElement
        Returns:
        an array of all annotations for this element
      • getAnnotation

        public <T extends Annotation> T getAnnotation(Class<T> annotationType)
        Description copied from interface: AnnotatedElement
        Returns, for this element, the annotation with the specified type, or null if no annotation with the specified type is present (including inherited annotations).
        Specified by:
        getAnnotation in interface AnnotatedElement
        Parameters:
        annotationType - the type of the annotation to search for
        Returns:
        the annotation with the specified type or null


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 15876 / 248376520. Delta: 0.00675 с