Class BinaryName


  • @Immutable
    public final class BinaryName
    extends Object
    Represents a Java binary class name for reference types, in the form of its fragments. This is the only way to tell the difference between a class called A$B and a class called A that has an inner class B.
    • Constructor Detail

      • BinaryName

        public BinaryName​(@Nullable
                          String pPkg,
                          @Nonnull
                          String pOuterCls,
                          @Nullable
                          String... pInnerCls)
        Constructor.
        Parameters:
        pPkg - package name
        pOuterCls - outer class simple name
        pInnerCls - inner class simple names in descending order of their nesting
      • BinaryName

        public BinaryName​(@Nullable
                          String pPkg,
                          @Nonnull
                          Collection<String> pClsNames)
        Constructor.
        Parameters:
        pPkg - package name
        pClsNames - class simple names in descending order of their nesting
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getPackage

        public String getPackage()
      • getOuterSimpleName

        public String getOuterSimpleName()
        Getter.
        Returns:
        the simple name of the outer class (even if this binary name represents an inner class)
      • getInnerSimpleName

        public String getInnerSimpleName()
        Getter.
        Returns:
        the simple name of the inner class represented by this binary name. null if this binary name does not represent an inner class
      • getOuterFqcn

        @CheckForNull
        public String getOuterFqcn()
        The fully qualified name of the outer class.
        Returns:
        that, or null if the simple name of the outer class is unknown