Interface JClassDefSection

    • Method Detail

      • section

        JClassDefSection section()
        Create a section at this point, into which additional items may be added.
        Returns:
        the new section to add
      • blankLine

        JClassDefSection blankLine()
        Add a blank line at this point of the type.
        Returns:
        this type definition
      • init

        JBlock init()
        Add a "raw" initialization block to this type definition.
        Returns:
        the initialization block
      • staticInit

        JBlock staticInit()
        Add a static initialization block to this type definition.
        Returns:
        the static initialization block
      • field

        JVarDeclaration field​(int mods,
                              JType type,
                              java.lang.String name)
        Add a field to this type.
        Parameters:
        mods - the modifiers
        type - the field type
        name - the field name
        Returns:
        the field declaration
      • field

        JVarDeclaration field​(int mods,
                              JType type,
                              java.lang.String name,
                              JExpr init)
        Add a field to this type.
        Parameters:
        mods - the modifiers
        type - the field type
        name - the field name
        init - the field assigned value
        Returns:
        the field declaration
      • field

        JVarDeclaration field​(int mods,
                              java.lang.Class<?> type,
                              java.lang.String name)
        Add a field to this type.
        Parameters:
        mods - the modifiers
        type - the field type
        name - the field name
        Returns:
        the field declaration
      • field

        JVarDeclaration field​(int mods,
                              java.lang.Class<?> type,
                              java.lang.String name,
                              JExpr init)
        Add a field to this type.
        Parameters:
        mods - the modifiers
        type - the field type
        name - the field name
        init - the field assigned value
        Returns:
        the field declaration
      • field

        JVarDeclaration field​(int mods,
                              java.lang.String type,
                              java.lang.String name)
        Add a field to this type.
        Parameters:
        mods - the modifiers
        type - the field type
        name - the field name
        Returns:
        the field declaration
      • field

        JVarDeclaration field​(int mods,
                              java.lang.String type,
                              java.lang.String name,
                              JExpr init)
        Add a field to this type.
        Parameters:
        mods - the modifiers
        type - the field type
        name - the field name
        init - the field assigned value
        Returns:
        the field declaration
      • method

        JMethodDef method​(int mods,
                          JType returnType,
                          java.lang.String name)
        Add a method to this type.
        Parameters:
        mods - the modifiers
        returnType - the method return type
        name - the method name
        Returns:
        the method definition
      • method

        JMethodDef method​(int mods,
                          java.lang.Class<?> returnType,
                          java.lang.String name)
        Add a method to this type.
        Parameters:
        mods - the modifiers
        returnType - the method return type
        name - the method name
        Returns:
        the method definition
      • method

        JMethodDef method​(int mods,
                          java.lang.String returnType,
                          java.lang.String name)
        Add a method to this type.
        Parameters:
        mods - the modifiers
        returnType - the method return type
        name - the method name
        Returns:
        the method definition
      • constructor

        JMethodDef constructor​(int mods)
        Add a constructor to this type.
        Parameters:
        mods - the modifiers
        Returns:
        the constructor definition
      • _class

        JClassDef _class​(int mods,
                         java.lang.String name)
        Add a nested class to this type.
        Parameters:
        mods - the class modifiers
        name - the class name
        Returns:
        the nested class
      • _enum

        JClassDef _enum​(int mods,
                        java.lang.String name)
        Add a nested enum to this type.
        Parameters:
        mods - the enum modifiers
        name - the enum name
        Returns:
        the nested enum
      • _interface

        JClassDef _interface​(int mods,
                             java.lang.String name)
        Add a nested interface to this type.
        Parameters:
        mods - the interface modifiers
        name - the interface name
        Returns:
        the nested interface
      • annotationInterface

        JClassDef annotationInterface​(int mods,
                                      java.lang.String name)
        Add a nested annotation interface to this type.
        Parameters:
        mods - the annotation interface modifiers
        name - the annotation interface name
        Returns:
        the nested annotation interface