Package net.kyori.mammoth
Class Extensions
- java.lang.Object
-
- net.kyori.mammoth.Extensions
-
public final class Extensions extends java.lang.ObjectHelpers for working with extensions.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> EfindOrCreate(org.gradle.api.plugins.ExtensionContainer extensions, java.lang.String name, java.lang.Class<? super E> publicType, java.lang.Class<E> implementationType)Find or create an extension by type from the provided container.static <E> EfindOrCreate(org.gradle.api.plugins.ExtensionContainer extensions, java.lang.String name, java.lang.Class<E> type)Find or create an extension by type from the provided container.
-
-
-
Method Detail
-
findOrCreate
public static <E> E findOrCreate(org.gradle.api.plugins.ExtensionContainer extensions, java.lang.String name, java.lang.Class<E> type)Find or create an extension by type from the provided container.- Type Parameters:
E- extension type- Parameters:
extensions- extension container to searchname- extension nametype- type to create the extension under- Returns:
- the new or existing extension instance
- Since:
- 1.0.0
-
findOrCreate
public static <E> E findOrCreate(org.gradle.api.plugins.ExtensionContainer extensions, java.lang.String name, java.lang.Class<? super E> publicType, java.lang.Class<E> implementationType)Find or create an extension by type from the provided container.- Type Parameters:
E- extension type- Parameters:
extensions- extension container to searchname- extension namepublicType- type to expose to extension consumersimplementationType- type to use to create the extension itsef- Returns:
- the new or existing extension instance
- Since:
- 1.0.0
-
-