Class ClassDescriptor

  • All Implemented Interfaces:
    Serializable

    public final class ClassDescriptor
    extends Object
    implements Serializable
    Contains basic information about the methods, fields and constructors for a class.
    Author:
    David B. Bracewell
    See Also:
    Serialized Form
    • Constructor Detail

      • ClassDescriptor

        public ClassDescriptor​(Class<?> clazz)
        Instantiates a new Class descriptor.
        Parameters:
        clazz - the clazz
    • Method Detail

      • getAncestors

        public Iterator<Reflect> getAncestors​(boolean reversed)
      • getClazz

        public Class<?> getClazz()
        Gets clazz.
        Returns:
        the clazz
      • getConstructors

        public Stream<Constructor<?>> getConstructors​(boolean privileged)
        Gets constructors.
        Parameters:
        privileged - the privileged
        Returns:
        the constructors
      • getField

        public Field getField​(String name,
                              boolean privileged)
        Gets field.
        Parameters:
        name - the name
        privileged - the privileged
        Returns:
        the field
      • getFields

        public Stream<Field> getFields​(boolean privileged)
        Gets fields.
        Parameters:
        privileged - the privileged
        Returns:
        the fields
      • getMethods

        public Stream<Method> getMethods​(boolean privileged)
        Gets methods.
        Parameters:
        privileged - the privileged
        Returns:
        the methods
      • getMethods

        public Stream<Method> getMethods​(String[] names,
                                         boolean privileged)
        Gets methods.
        Parameters:
        privileged - the privileged
        Returns:
        the methods
      • getMethods

        public Stream<Method> getMethods​(String name,
                                         boolean privileged)
        Gets methods.
        Parameters:
        name - the name
        privileged - the privileged
        Returns:
        the methods
      • getSingletonMethod

        public Method getSingletonMethod()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object