Class AbstractInfo

  • Direct Known Subclasses:
    ClassInfo, FieldInfo, MethodInfo

    public abstract class AbstractInfo
    extends java.lang.Object
    An abstract class representing information about a class, method or field.
    Author:
    Antony Riley
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int access
      The access flags for this class, method or field.
      java.lang.String ACCESS_PACKAGE
      The string used to represent a class, method or field with package private access.
      java.lang.String ACCESS_PRIVATE
      The string used to represent a class, method or field with private access.
      java.lang.String ACCESS_PROTECTED
      The string used to represent a class, method or field with protected access.
      java.lang.String ACCESS_PUBLIC
      The string used to represent a class, method or field with public access.
      private java.lang.String name
      The internal name of this class, method or field.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractInfo​(int access, java.lang.String name)
      Construct a new AbstractInfo with the specified access and name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAccess()
      Get the access flags for this class, method or field.
      java.lang.String getAccessType()
      Retrivie the access level for this class, method or field.
      java.lang.String getName()
      Get the internal name of this class, method or field.
      boolean isAbstract()
      Test if this class, method or field is abstract.
      boolean isAnnotation()
      Test if this class, method or field is annotation
      boolean isBridge()
      Test if this class, method or field is a bridge
      boolean isDeprecated()
      Test if this class, method or field is deprecated.
      boolean isEnum()
      Test if this class, method or field is an enum.
      boolean isFinal()
      Test if this class, method or field is final.
      boolean isInterface()
      Test if this class, method or field is an interface.
      boolean isNative()
      Test if this class, method or field is native.
      boolean isPackagePrivate()
      Test if this class, method or field is package private.
      boolean isPrivate()
      Test if this class, method or field is private.
      boolean isProtected()
      Test if this class, method or field is protected.
      boolean isPublic()
      Test if this class, method or field is public.
      boolean isStatic()
      Test if this class, method or field is static.
      boolean isStrict()
      Test if this class, method or field is string.
      boolean isSuper()
      Test if this class, method or field is super.
      boolean isSynchronized()
      Test if this class, method or field is synchronized.
      boolean isSynthetic()
      Test if this class, method or field is synthetic.
      boolean isTransient()
      Test if this class or field is transient.
      boolean isVarargs()
      Test if this method is varargs.
      boolean isVolatile()
      Test if this class, method or field is volatile.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ACCESS_PUBLIC

        public final java.lang.String ACCESS_PUBLIC
        The string used to represent a class, method or field with public access.
        See Also:
        Constant Field Values
      • ACCESS_PROTECTED

        public final java.lang.String ACCESS_PROTECTED
        The string used to represent a class, method or field with protected access.
        See Also:
        Constant Field Values
      • ACCESS_PACKAGE

        public final java.lang.String ACCESS_PACKAGE
        The string used to represent a class, method or field with package private access. Package private access is the default access level used by java when you do not specify one of public, protected or private.
        See Also:
        Constant Field Values
      • ACCESS_PRIVATE

        public final java.lang.String ACCESS_PRIVATE
        The string used to represent a class, method or field with private access.
        See Also:
        Constant Field Values
      • access

        private final int access
        The access flags for this class, method or field.
      • name

        private final java.lang.String name
        The internal name of this class, method or field.
    • Constructor Detail

      • AbstractInfo

        public AbstractInfo​(int access,
                            java.lang.String name)
        Construct a new AbstractInfo with the specified access and name.
        Parameters:
        access - The access flags for this class, method or field.
        name - The internal name of this class, method or field.
    • Method Detail

      • getAccess

        public final int getAccess()
        Get the access flags for this class, method or field.
        Returns:
        the access flags.
      • getName

        public final java.lang.String getName()
        Get the internal name of this class, method or field.
        Returns:
        the name
      • isPublic

        public final boolean isPublic()
        Test if this class, method or field is public.
        Returns:
        true if it is public.
      • isProtected

        public final boolean isProtected()
        Test if this class, method or field is protected.
        Returns:
        true if it is protected.
      • isPackagePrivate

        public final boolean isPackagePrivate()
        Test if this class, method or field is package private.
        Returns:
        true if it is package private.
      • isPrivate

        public final boolean isPrivate()
        Test if this class, method or field is private.
        Returns:
        true if it is private.
      • isAbstract

        public final boolean isAbstract()
        Test if this class, method or field is abstract.
        Returns:
        true if it is abstract.
      • isAnnotation

        public final boolean isAnnotation()
        Test if this class, method or field is annotation
        Returns:
        true if it is annotation.
      • isBridge

        public final boolean isBridge()
        Test if this class, method or field is a bridge
        Returns:
        true if it is a bridge.
      • isDeprecated

        public final boolean isDeprecated()
        Test if this class, method or field is deprecated.
        Returns:
        true if it is deprecated.
      • isEnum

        public final boolean isEnum()
        Test if this class, method or field is an enum.
        Returns:
        true if it is an enum.
      • isFinal

        public final boolean isFinal()
        Test if this class, method or field is final.
        Returns:
        true if it is final.
      • isInterface

        public final boolean isInterface()
        Test if this class, method or field is an interface.
        Returns:
        true if it is an interface.
      • isNative

        public final boolean isNative()
        Test if this class, method or field is native.
        Returns:
        true if it is native.
      • isStatic

        public final boolean isStatic()
        Test if this class, method or field is static.
        Returns:
        true if it is static.
      • isStrict

        public final boolean isStrict()
        Test if this class, method or field is string.
        Returns:
        true if it is strict.
      • isSuper

        public final boolean isSuper()
        Test if this class, method or field is super.
        Returns:
        true if it is super.
      • isSynchronized

        public final boolean isSynchronized()
        Test if this class, method or field is synchronized.
        Returns:
        true if it is synchronized
      • isSynthetic

        public final boolean isSynthetic()
        Test if this class, method or field is synthetic.
        Returns:
        true if it is synchronized.
      • isTransient

        public final boolean isTransient()
        Test if this class or field is transient. If this flag is set on a method it means something different.
        Returns:
        true if it is transient.
      • isVarargs

        public final boolean isVarargs()
        Test if this method is varargs. If this flag is set on a class or field it means something different. Well, it probably shouldn't be set on a class as it would make no sense, it only really makes sense on fields and methods.
        Returns:
        true if it is vargargs.
      • isVolatile

        public final boolean isVolatile()
        Test if this class, method or field is volatile.
        Returns:
        true if it is volatile.
      • getAccessType

        public final java.lang.String getAccessType()
        Retrivie the access level for this class, method or field.
        Returns:
        the access level