Class ClassgraphJavaTypeSignatureBuilder

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String arraySignature​(java.lang.Object type)  
      java.lang.String classSignature​(java.lang.Object type)  
      java.lang.String generic​(io.github.classgraph.TypeParameter typeParameter)  
      java.lang.String genericSignature​(java.lang.Object type)
      When generic type variables are cyclic, like U extends Cyclic<? extends U>, represent the cycle with the bound name, like Generic{U extends Cyclic<? extends U>}.
      java.lang.String methodSignature​(io.github.classgraph.MethodInfo methodInfo)  
      java.lang.String parameterizedSignature​(java.lang.Object type)  
      java.lang.String primitiveSignature​(java.lang.Object type)  
      java.lang.String signature​(@Nullable java.lang.Object type)  
      java.lang.String variableSignature​(io.github.classgraph.FieldInfo fieldInfo)  
      • Methods inherited from class java.lang.Object

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

      • ClassgraphJavaTypeSignatureBuilder

        public ClassgraphJavaTypeSignatureBuilder()
    • Method Detail

      • signature

        public java.lang.String signature​(@Nullable
                                          @Nullable java.lang.Object type)
        Specified by:
        signature in interface JavaTypeSignatureBuilder
        Parameters:
        type - A type object.
        Returns:
        The type signature. If t is null, the signature is {undefined}.
      • arraySignature

        public java.lang.String arraySignature​(java.lang.Object type)
        Specified by:
        arraySignature in interface JavaTypeSignatureBuilder
        Parameters:
        type - An array type.
        Returns:
        Formatted like Integer[].
      • classSignature

        public java.lang.String classSignature​(java.lang.Object type)
        Specified by:
        classSignature in interface JavaTypeSignatureBuilder
        Parameters:
        type - A class type.
        Returns:
        Formatted like java.util.List.
      • genericSignature

        public java.lang.String genericSignature​(java.lang.Object type)
        Description copied from interface: JavaTypeSignatureBuilder
        When generic type variables are cyclic, like U extends Cyclic<? extends U>, represent the cycle with the bound name, like Generic{U extends Cyclic<? extends U>}.

        When the bound is Object (regardless of whether that bound is implicit or explicit in the source code),the type variable is considered invariant and the bound is omitted. So Generic{List<?>} is favored over Generic{List<? extends java.lang.Object>}.

        Specified by:
        genericSignature in interface JavaTypeSignatureBuilder
        Parameters:
        type - A generic type.
        Returns:
        Formatted like Generic{U extends java.lang.Comparable} (covariant) or Generic{U super java.lang.Comparable} (contravariant).
      • generic

        public java.lang.String generic​(io.github.classgraph.TypeParameter typeParameter)
      • parameterizedSignature

        public java.lang.String parameterizedSignature​(java.lang.Object type)
        Specified by:
        parameterizedSignature in interface JavaTypeSignatureBuilder
        Parameters:
        type - A parameterized type.
        Returns:
        Formatted like java.util.List<java.util.List<Integer>>.
      • primitiveSignature

        public java.lang.String primitiveSignature​(java.lang.Object type)
        Specified by:
        primitiveSignature in interface JavaTypeSignatureBuilder
        Parameters:
        type - A primitive type.
        Returns:
        Formatted like Integer.
      • methodSignature

        public java.lang.String methodSignature​(io.github.classgraph.MethodInfo methodInfo)
      • variableSignature

        public java.lang.String variableSignature​(io.github.classgraph.FieldInfo fieldInfo)