Class ClassNodeBuilder


  • public final class ClassNodeBuilder
    extends Object
    Builder to create instances of type ClassNode
    Since:
    0.1.0
    • Method Detail

      • clazz

        public static ClassNodeBuilder clazz​(String qualifiedName)
        Creates a new instance of ClassNodeBuilder by using the fully qualified name of a Class

        AST
        clazz('java.lang.String')
         .build()
        Result
        String.class
        Parameters:
        qualifiedName - a String withe the complete name of the class
        Returns:
        current instance of ClassNodeBuilder
        Since:
        0.1.0
      • clazzWithGenerics

        public static ClassNodeBuilder clazzWithGenerics​(Class<?> clazz,
                                                         GenericsType... genericsTypes)
        Creates a new instance of ClassNodeBuilder by using the fully qualified name of a Class
        Parameters:
        clazz - The type of the class node
        genericsTypes - the generic types the class node will have
        Returns:
        current instance of ClassNodeBuilder
        Since:
        0.1.0
      • usingGenerics

        public ClassNodeBuilder usingGenerics​(Boolean useGenerics)
        Informs the builder whether to use generics in the resulting ClassNode or not.
        Parameters:
        useGenerics - true if it should use generics
        Returns:
        current instance of ClassNodeBuilder
        Since:
        0.1.0
      • genericsPlaceHolder

        public ClassNodeBuilder genericsPlaceHolder​(Boolean usePlaceholder)
        Informs the builder whether to use a generic placeholder in the resulting ClassNode or not.
        Parameters:
        usePlaceholder - true if the builder should use it
        Returns:
        current instance of ClassNodeBuilder
        Since:
        0.1.0
      • build

        public ClassNode build()
        Returns the instance of type ClassNode configured by this builder
        Returns:
        an instance of ClassNode
        Since:
        0.1.0