Class MethodGraph.Compiler.Default<T>

    • Method Detail

      • of

        public static <S> MethodGraph.Compiler of​(MethodGraph.Compiler.Default.Harmonizer<S> harmonizer,
                                                  MethodGraph.Compiler.Default.Merger merger)
        Creates a default compiler using the given harmonizer and merger. All raw types are reified before analyzing their properties.
        Type Parameters:
        S - The type of the harmonizer token.
        Parameters:
        harmonizer - The harmonizer to be used for creating tokens that uniquely identify a method hierarchy.
        merger - The merger to be used for identifying a method to represent an ambiguous method resolution.
        Returns:
        A default compiler for the given harmonizer and merger.
      • of

        public static <S> MethodGraph.Compiler of​(MethodGraph.Compiler.Default.Harmonizer<S> harmonizer,
                                                  MethodGraph.Compiler.Default.Merger merger,
                                                  TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
        Creates a default compiler using the given harmonizer and merger.
        Type Parameters:
        S - The type of the harmonizer token.
        Parameters:
        harmonizer - The harmonizer to be used for creating tokens that uniquely identify a method hierarchy.
        merger - The merger to be used for identifying a method to represent an ambiguous method resolution.
        visitor - A visitor to apply to all type descriptions before analyzing their methods or resolving super types.
        Returns:
        A default compiler for the given harmonizer and merger.
      • forJavaHierarchy

        public static MethodGraph.Compiler forJavaHierarchy()

        Creates a default compiler for a method hierarchy following the rules of the Java programming language. According to these rules, two methods of the same name are only different if their parameter types represent different raw types. The return type is not considered as a part of the signature.

        Ambiguous methods are merged by considering the method that was discovered first.

        Returns:
        A compiler for resolving a method hierarchy following the rules of the Java programming language.
      • forJVMHierarchy

        public static MethodGraph.Compiler forJVMHierarchy()

        Creates a default compiler for a method hierarchy following the rules of the Java virtual machine. According to these rules, two methods of the same name are different if their parameter types and return types represent different type erasures.

        Ambiguous methods are merged by considering the method that was discovered first.

        Returns:
        A compiler for resolving a method hierarchy following the rules of the Java programming language.
      • compile

        public MethodGraph.Linked compile​(TypeDefinition typeDefinition,
                                          TypeDescription viewPoint)
        Compiles the given type into a method graph.
        Parameters:
        typeDefinition - The type to be compiled.
        viewPoint - The view point that determines the method's visibility.
        Returns:
        A linked method graph representing the given type.