Class MemberRef


  • public class MemberRef
    extends java.lang.Object
    MemberRef represents a method or field (as a NameAndType) and the class (as a Type) in which it is declared.
    • Constructor Summary

      Constructors 
      Constructor Description
      MemberRef​(Type declaringClass, NameAndType nameAndType)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Type declaringClass()
      Get the type of the class which declared the member.
      boolean equals​(java.lang.Object obj)
      Check if an object is equal to this reference.
      int hashCode()
      Hash the member reference.
      java.lang.String name()
      Get the name of the member.
      NameAndType nameAndType()
      Get the name and type of the member.
      java.lang.String toString()
      Convert the reference to a string.
      Type type()
      Get the type of the member.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MemberRef

        public MemberRef​(Type declaringClass,
                         NameAndType nameAndType)
        Constructor.
        Parameters:
        declaringClass - The type of the class which declared the member.
        nameAndType - The name and type of the member.
    • Method Detail

      • declaringClass

        public Type declaringClass()
        Get the type of the class which declared the member.
        Returns:
        The type of the class which declared the member.
      • name

        public java.lang.String name()
        Get the name of the member.
        Returns:
        The name of the member.
      • type

        public Type type()
        Get the type of the member.
        Returns:
        The type of the member.
      • nameAndType

        public NameAndType nameAndType()
        Get the name and type of the member.
        Returns:
        The name and type of the member.
      • toString

        public java.lang.String toString()
        Convert the reference to a string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the reference.
      • equals

        public boolean equals​(java.lang.Object obj)
        Check if an object is equal to this reference.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The object to compare against.
        Returns:
        true if equal, false if not.
      • hashCode

        public int hashCode()
        Hash the member reference.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code.