Interface IMixinConfig
-
public interface IMixinConfigInterface for loaded mixin configurations
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PRIORITYDefault priority for mixin configs and mixins
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> voiddecorate(java.lang.String key, V value)Decorate this config with arbitrary metadata for debugging or compatibility purposesjava.lang.StringgetCleanSourceId()Get the id of the source id with all non-alpha characters removed.<V> VgetDecoration(java.lang.String key)Get the specified decorationMixinEnvironmentgetEnvironment()Get the parent environment of this configjava.lang.StringgetMixinPackage()Get the package containing all mixin classesjava.lang.StringgetName()Get the name of the file from which this configuration object was initialisedIMixinConfigPlugingetPlugin()Get the companion plugin, if availableintgetPriority()Get the priorityIMixinConfigSourcegetSource()Get the source which initially provide this configuration object, for example the jar which specified it.java.util.Set<java.lang.String>getTargets()Get targets for this configurationbooleanhasDecoration(java.lang.String key)Get whether this node is decorated with the specified keybooleanisRequired()True if this mixin is required (failure to apply a defined mixin is an error condition).
-
-
-
Field Detail
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY
Default priority for mixin configs and mixins- See Also:
- Constant Field Values
-
-
Method Detail
-
getEnvironment
MixinEnvironment getEnvironment()
Get the parent environment of this config- Returns:
- the parent environment
-
getName
java.lang.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
java.lang.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
java.lang.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
java.util.Set<java.lang.String> getTargets()
Get targets for this configuration- Returns:
- target classes of mixins in this config
-
decorate
<V> void decorate(java.lang.String key, V value)Decorate this config with arbitrary metadata for debugging or compatibility purposes- Type Parameters:
V- value type- Parameters:
key- meta keyvalue- meta value- Throws:
java.lang.IllegalArgumentException- if the specified key exists already
-
hasDecoration
boolean hasDecoration(java.lang.String key)
Get whether this node is decorated with the specified key- Parameters:
key- meta key- Returns:
- true if the specified decoration exists
-
getDecoration
<V> V getDecoration(java.lang.String key)
Get the specified decoration- Type Parameters:
V- value type- Parameters:
key- meta key- Returns:
- decoration value or null if absent
-
-