Interface HasGenerics<T extends HasGenerics<T>>

    • Method Detail

      • add

        default T add​(Generic generic)
        Adds the specified Generic to this model.
        Parameters:
        generic - the new child
        Returns:
        a reference to this
      • generic

        default T generic​(Generic generic)
        Adds the specified Generic to this model. This method is a synonym of add(Generic).
        Parameters:
        generic - the new child
        Returns:
        a reference to this
        Since:
        2.5
      • generic

        default T generic​(String generic)
        Created a new Generic with the specified name and adds it to this model.
        Parameters:
        generic - the name of the new generic variable
        Returns:
        a reference to this
        Since:
        2.5
      • generic

        default T generic​(Type generic)
        Created a new Generic with the specified type and adds it to this model.
        Parameters:
        generic - the type of the new generic variable
        Returns:
        a reference to this
        Since:
        2.5
      • generic

        default T generic​(String name,
                          Type type)
        Created a new Generic with the specified name and type and adds it to this model. The bound type of the new Generic will be Generic.BoundType.EXTENDS.
        Parameters:
        name - the name of the new generic
        type - the upper bound of the new generic
        Returns:
        a reference to this
        Since:
        2.5
      • getGenerics

        List<Generic> getGenerics()
        Returns a list of all the generics in this model.

        The list returned must be mutable for changes!

        Returns:
        the generics