Interface IMixinConfig


public interface IMixinConfig
Interface for loaded mixin configurations
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default priority for mixin configs and mixins
  • Method Summary

    Modifier and Type
    Method
    Description
    <V> void
    decorate(String key, V value)
    Decorate this config with arbitrary metadata for debugging or compatibility purposes
    Get the id of the source id with all non-alpha characters removed.
    <V> V
    Get the specified decoration
    Get the parent environment of this config
    Get the package containing all mixin classes
    Get the name of the file from which this configuration object was initialised
    Get the companion plugin, if available
    int
    Get the priority
    Get the source which initially provide this configuration object, for example the jar which specified it.
    Get targets for this configuration
    boolean
    Get whether this node is decorated with the specified key
    boolean
    True if this mixin is required (failure to apply a defined mixin is an error condition).
  • Field Details

    • DEFAULT_PRIORITY

      static final int DEFAULT_PRIORITY
      Default 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

      Set<String> getTargets()
      Get targets for this configuration
      Returns:
      target classes of mixins in this config
    • decorate

      <V> void decorate(String key, V value)
      Decorate this config with arbitrary metadata for debugging or compatibility purposes
      Type Parameters:
      V - value type
      Parameters:
      key - meta key
      value - meta value
      Throws:
      IllegalArgumentException - if the specified key exists already
    • hasDecoration

      boolean hasDecoration(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(String key)
      Get the specified decoration
      Type Parameters:
      V - value type
      Parameters:
      key - meta key
      Returns:
      decoration value or null if absent