Class TypeResolver


  • public class TypeResolver
    extends Object
    A per JavaClass resolver of types
    Since:
    2.0
    Author:
    Robert Scholte
    • Method Detail

      • byPackageName

        public static TypeResolver byPackageName​(String binaryName,
                                                 ClassLibrary classLibrary,
                                                 Collection<String> imports)
        Type resolver in case there's no declaring class, e.g. using extends, implements and annotations on a toplevel class
        Parameters:
        binaryName - the binary name of the package
        classLibrary - the class library
        imports - the imports, can be null
        Returns:
        the typeResolver
      • byClassName

        public static TypeResolver byClassName​(String binaryName,
                                               ClassLibrary classLibrary,
                                               Collection<String> imports)
        Parameters:
        binaryName - the class in which context a type is used.
        classLibrary - the class library
        imports - the imports, can be null
        Returns:
        the typeResolver
      • resolveJavaClass

        public JavaClass resolveJavaClass​(String typeName)
      • resolveType

        public String resolveType​(String typeName)