Interface IMixinConfig
public interface IMixinConfig
Interface for loaded mixin configurations
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault priority for mixin configs and mixins -
Method Summary
Modifier and TypeMethodDescription<V> voidDecorate this config with arbitrary metadata for debugging or compatibility purposesGet the id of the source id with all non-alpha characters removed.<V> VgetDecoration(String key) Get the specified decorationGet the parent environment of this configGet the package containing all mixin classesgetName()Get the name of the file from which this configuration object was initialisedGet the companion plugin, if availableintGet the priorityGet the source which initially provide this configuration object, for example the jar which specified it.Get targets for this configurationbooleanhasDecoration(String key) Get whether this node is decorated with the specified keybooleanTrue if this mixin is required (failure to apply a defined mixin is an error condition).
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYDefault priority for mixin configs and mixins- See Also:
-
-
Method Details
-
getEnvironment
MixinEnvironment getEnvironment()Get the parent environment of this config- Returns:
- the parent environment
-
getName
String getName()Get the name of the file from which this configuration object was initialised- Returns:
- the config filename (resource name)
-
getSource
IMixinConfigSource getSource()Get the source which initially provide this configuration object, for example the jar which specified it.- Returns:
- the config source, or null if not provided by the service
-
getCleanSourceId
String getCleanSourceId()Get the id of the source id with all non-alpha characters removed. If the source is null or the source's id is null then this method returns null also. -
getMixinPackage
String getMixinPackage()Get the package containing all mixin classes- Returns:
- the base package name for this config
-
getPriority
int getPriority()Get the priority- Returns:
- the priority
-
getPlugin
IMixinConfigPlugin getPlugin()Get the companion plugin, if available- Returns:
- the companion plugin instance or null if no plugin
-
isRequired
boolean isRequired()True if this mixin is required (failure to apply a defined mixin is an error condition).- Returns:
- true if this config is marked as required
-
getTargets
Get targets for this configuration- Returns:
- target classes of mixins in this config
-
decorate
Decorate this config with arbitrary metadata for debugging or compatibility purposes- Type Parameters:
V- value type- Parameters:
key- meta keyvalue- meta value- Throws:
IllegalArgumentException- if the specified key exists already
-
hasDecoration
Get whether this node is decorated with the specified key- Parameters:
key- meta key- Returns:
- true if the specified decoration exists
-
getDecoration
Get the specified decoration- Type Parameters:
V- value type- Parameters:
key- meta key- Returns:
- decoration value or null if absent
-