Class TypeArgument

    • Method Detail

      • getWildcard

        public TypeArgument.Wildcard getWildcard()
        Get the type wildcard, which is one of {NONE, ANY, EXTENDS, SUPER}.
        Returns:
        The type wildcard.
      • getTypeSignature

        public ReferenceTypeSignature getTypeSignature()
        Get the type signature associated with the wildcard (or null, if the wildcard is ANY).
        Returns:
        The type signature.
      • parse

        private static TypeArgument parse​(Parser parser,
                                          java.lang.String definingClassName)
                                   throws ParseException
        Parse a type argument.
        Parameters:
        parser - The parser.
        definingClassName - The name of the defining class (for resolving type variables).
        Returns:
        The parsed method type signature.
        Throws:
        ParseException - If method type signature could not be parsed.
      • parseList

        static java.util.List<TypeArgument> parseList​(Parser parser,
                                                      java.lang.String definingClassName)
                                               throws ParseException
        Parse a list of type arguments.
        Parameters:
        parser - The parser.
        definingClassName - The name of the defining class (for resolving type variables).
        Returns:
        The list of type arguments.
        Throws:
        ParseException - If type signature could not be parsed.
      • getClassInfo

        protected ClassInfo getClassInfo()
        Description copied from class: ScanResultObject
        Get the ClassInfo object for the referenced class, or null if the referenced class was not encountered during scanning (i.e. no ClassInfo object was created for the class during scanning). N.B. even if this method returns null, ScanResultObject.loadClass() may be able to load the referenced class by name.
        Overrides:
        getClassInfo in class ScanResultObject
        Returns:
        The ClassInfo object for the referenced class.
      • findReferencedClassNames

        public void findReferencedClassNames​(java.util.Set<java.lang.String> refdClassNames)
        Get the names of any classes referenced in the type signature.
        Parameters:
        refdClassNames - the referenced class names.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toStringInternal

        protected void toStringInternal​(boolean useSimpleNames,
                                        AnnotationInfoList annotationsToExclude,
                                        java.lang.StringBuilder buf)
        Description copied from class: HierarchicalTypeSignature
        Render type signature to string.
        Specified by:
        toStringInternal in class HierarchicalTypeSignature
        Parameters:
        useSimpleNames - whether to use simple names for classes.
        annotationsToExclude - toplevel annotations to exclude, to eliminate duplication (toplevel annotations are both class/field/method annotations and type annotations).
        buf - the StringBuilder to write to.