/** * Creates a new instance implementing this interface by using the default * implementation. * * @param upperBound the upper bound, example: {@code "String"} * @return the new instance */ static Generic of(Type upperBound) { return of().add(upperBound); } }
/** * Created a new {@link Generic} with the specified name and type and adds * it to this model. The {@link Generic#getBoundType() bound type} of the * new {@link Generic} will be {@link Generic.BoundType#EXTENDS}. * * @param name the name of the new generic * @param type the upper bound of the new generic * @return a reference to this * * @since 2.5 */ default T generic(final String name, final Type type) { return add(Generic.of(name).add(type)); }
/** * Creates a new instance implementing this interface by using the default * implementation. * * @param upperBound the upper bound, example: {@code "String"} * @return the new instance */ static Generic of(Type upperBound) { return of().add(upperBound); } }
/** * Creates a new instance implementing this interface by using the default * implementation. * * @param upperBound the upper bound, example: {@code "String"} * @return the new instance */ static Generic of(Type upperBound) { return of().add(upperBound); } }
/** * Created a new {@link Generic} with the specified name and type and adds * it to this model. The {@link Generic#getBoundType() bound type} of the * new {@link Generic} will be {@link Generic.BoundType#EXTENDS}. * * @param name the name of the new generic * @param type the upper bound of the new generic * @return a reference to this * * @since 2.5 */ default T generic(final String name, final Type type) { return add(Generic.of(name).add(type)); }