Class InjectorGroupInfo

java.lang.Object
org.spongepowered.asm.mixin.injection.struct.InjectorGroupInfo

public class InjectorGroupInfo
extends java.lang.Object
Information store for injector groups
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  InjectorGroupInfo.Map
    Storage for injector groups
  • Constructor Summary

    Constructors
    Constructor Description
    InjectorGroupInfo​(java.lang.String name)  
  • Method Summary

    Modifier and Type Method Description
    InjectorGroupInfo add​(InjectionInfo member)
    Add a new member to this group
    int getMaxAllowed()  
    java.util.Collection<InjectionInfo> getMembers()
    Get all members of this group as a read-only collection
    int getMinRequired()  
    java.lang.String getName()  
    boolean isDefault()  
    void setMaxAllowed​(int max)
    Set the required minimum value for this group.
    void setMinRequired​(int min)
    Set the required minimum value for this group.
    java.lang.String toString()  
    InjectorGroupInfo validate()
    Validate all members in this group

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • InjectorGroupInfo

      public InjectorGroupInfo​(java.lang.String name)
  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • isDefault

      public boolean isDefault()
    • getName

      public java.lang.String getName()
    • getMinRequired

      public int getMinRequired()
    • getMaxAllowed

      public int getMaxAllowed()
    • getMembers

      public java.util.Collection<InjectionInfo> getMembers()
      Get all members of this group as a read-only collection
      Returns:
      read-only view of group members
    • setMinRequired

      public void setMinRequired​(int min)
      Set the required minimum value for this group. Since this is normally done on the first Group annotation it is considered a warning-level event if a later annotation sets a different value. The highest value specified on all annotations is always used.
      Parameters:
      min - new value for min required
    • setMaxAllowed

      public void setMaxAllowed​(int max)
      Set the required minimum value for this group. Since this is normally done on the first Group annotation it is considered a warning-level event if a later annotation sets a different value. The highest value specified on all annotations is always used.
      Parameters:
      max - new value for max allowed
    • add

      public InjectorGroupInfo add​(InjectionInfo member)
      Add a new member to this group
      Parameters:
      member - injector to add
      Returns:
      fluent interface
    • validate

      Validate all members in this group
      Returns:
      fluent interface
      Throws:
      InjectionValidationException - if validation fails