Interface NodeWithConstructors<N extends Node>

    • Method Detail

      • getConstructors

        default List<ConstructorDeclaration> getConstructors()
        Find all constructors for this class.
        Returns:
        the constructors found. This list is immutable.
      • getConstructorByParameterTypes

        default Optional<ConstructorDeclaration> getConstructorByParameterTypes​(String... paramTypes)
        Try to find a ConstructorDeclaration by its parameters types
        Parameters:
        paramTypes - the types of parameters like "Map<Integer,String>","int" to match
        void foo(Map<Integer,String> myMap,int number)
        Returns:
        the constructor found (multiple in case of overloading)
      • getConstructorByParameterTypes

        default Optional<ConstructorDeclaration> getConstructorByParameterTypes​(Class<?>... paramTypes)
        Try to find a ConstructorDeclaration by its parameters types
        Parameters:
        paramTypes - the types of parameters like "Map<Integer,String>","int" to match
        void foo(Map<Integer,String> myMap,int number)
        Returns:
        the constructors found (multiple in case of overloading)