Package 

Interface MemberMirror

  • All Implemented Interfaces:
    dev.thecodewarrior.mirror.util.DeclarationMirror

    
    public interface MemberMirror
     implements DeclarationMirror
                        

    The abstract superclass representing any Java class member

    • Method Summary

      Modifier and Type Method Description
      abstract MemberMirror withDeclaringClass(ClassMirror enclosing) Returns a copy of this member with its enclosing class replaced with enclosing.
      abstract String toString() Returns a string describing this member.
      abstract Member getJava() The Core Reflection object this mirror represents
      abstract MemberMirror getRaw() The mirror representing this member without any generic specialization
      abstract Set<Modifier> getModifiers() The set of modifiers present on this member.
      abstract Modifier.Access getAccess() The access control modifier for this member.
      abstract Boolean getIsPublic() A shorthand for checking if the publicmodifier is present on this field.
      abstract Boolean getIsProtected() A shorthand for checking if the protectedmodifier is present on this field.
      abstract Boolean getIsPrivate() A shorthand for checking if the privatemodifier is present on this field.
      abstract Boolean getIsPackagePrivate() A shorthand for checking if neither the public, protected, nor privatemodifiers are present on this field.
      abstract Boolean getIsSynthetic() Returns true if this member is synthetic.
      abstract Boolean getIsKotlinMember() Returns true if this member is declared in a class directly written in Kotlin
      abstract AnnotationList getAnnotations() Returns annotations that are present on the member this mirror represents.
      abstract AnnotationList getDeclaredAnnotations() Returns annotations that are declared on the member this mirror represents.
      abstract ClassMirror getDeclaringClass() The specialized class this member is declared in
      • Methods inherited from class dev.thecodewarrior.mirror.member.MemberMirror

        toDeclarationString, toJavaDeclarationString, toKotlinDeclarationString
      • Methods inherited from class java.lang.Object

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

      • withDeclaringClass

         abstract MemberMirror withDeclaringClass(ClassMirror enclosing)

        Returns a copy of this member with its enclosing class replaced with enclosing. Substituting type variables as necessary. If the passed class is null this method removes any enclosing class specialization.

        Note: A new mirror is only created if none already exist with the required specialization

      • toString

         abstract String toString()

        Returns a string describing this member.

      • getJava

         abstract Member getJava()

        The Core Reflection object this mirror represents

      • getRaw

         abstract MemberMirror getRaw()

        The mirror representing this member without any generic specialization

      • getModifiers

         abstract Set<Modifier> getModifiers()

        The set of modifiers present on this member. This set is in customary order, as defined in JLS §8.1.1

        Note: This set is immutable

      • getIsPublic

         abstract Boolean getIsPublic()

        A shorthand for checking if the publicmodifier is present on this field.

      • getIsProtected

         abstract Boolean getIsProtected()

        A shorthand for checking if the protectedmodifier is present on this field.

      • getIsPrivate

         abstract Boolean getIsPrivate()

        A shorthand for checking if the privatemodifier is present on this field.

      • getIsPackagePrivate

         abstract Boolean getIsPackagePrivate()

        A shorthand for checking if neither the public, protected, nor privatemodifiers are present on this field.

      • getIsKotlinMember

         abstract Boolean getIsKotlinMember()

        Returns true if this member is declared in a class directly written in Kotlin