Class RecordComponentDescription.ForLoadedRecordComponent

    • Constructor Detail

      • ForLoadedRecordComponent

        protected ForLoadedRecordComponent​(java.lang.reflect.AnnotatedElement recordComponent)
        Creates a new representation of a loaded record component.
        Parameters:
        recordComponent - The represented record component.
    • Method Detail

      • doPrivileged

        @Enhance
        private static <T> T doPrivileged​(java.security.PrivilegedAction<T> action)
        A proxy for java.security.AccessController#doPrivileged that is activated if available.
        Type Parameters:
        T - The type of the action's resolved value.
        Parameters:
        action - The action to execute from a privileged context.
        Returns:
        The action's resolved value.
      • of

        public static RecordComponentDescription of​(java.lang.Object recordComponent)
        Resolves an instance into a record component description.
        Parameters:
        recordComponent - The record component to represent.
        Returns:
        A suitable description of the record component.
      • getType

        public TypeDescription.Generic getType()
        Returns the type of the record.
        Returns:
        The type of the record.
      • getDeclaringType

        public TypeDescription getDeclaringType()
        Returns the declaring type of this instance.
        Returns:
        The declaring type or null if no such type exists.
      • getActualName

        public java.lang.String getActualName()
        Returns the display name of this element as it is found in the source code. If no such name exists, an empty string is returned.
        Returns:
        The name of this element as given in a Java program's source code.
      • getDeclaredAnnotations

        public AnnotationList getDeclaredAnnotations()
        Returns a list of annotations that are declared by this instance.
        Returns:
        A list of declared annotations.