Interface TypeHolderSource<T extends JavaSource<T>>

    • Method Detail

      • addNestedType

        <NESTED_TYPE extends JavaSource<?>> NESTED_TYPE addNestedType​(Class<NESTED_TYPE> type)
        Creates a nested type in this JavaSource. Any modification of returned JavaSource instances will result in modification of the contents contained by this the parent instance.
      • addNestedType

        <NESTED_TYPE extends JavaSource<?>> NESTED_TYPE addNestedType​(String declaration)
        Add a new type declaration to this instance, using the given String as the declaration.

        For example:
        JavaClassSource source = javaClass.addNested("public class InnerClass{}");

      • addNestedType

        <NESTED_TYPE extends JavaSource<?>> NESTED_TYPE addNestedType​(NESTED_TYPE type)
        Adds a type as a nested type in this JavaSource. Any modification of returned JavaSource instances will result in modification of the contents contained by this the parent instance.
      • removeNestedType

        T removeNestedType​(JavaSource<?> type)
        Remove the nested type instance, if it exists; otherwise, do nothing.