Class InjectorGroupInfo.Map
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,InjectorGroupInfo>
-
- org.spongepowered.asm.mixin.injection.struct.InjectorGroupInfo.Map
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,InjectorGroupInfo>
- Enclosing class:
- InjectorGroupInfo
public static final class InjectorGroupInfo.Map extends java.util.HashMap<java.lang.String,InjectorGroupInfo>
Storage for injector groups- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Map()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InjectorGroupInfoforName(java.lang.String name)Get group for the specified name, creates the group in this map if it does not already existInjectorGroupInfoget(java.lang.Object key)InjectorGroupInfoparseGroup(org.objectweb.asm.tree.AnnotationNode annotation, java.lang.String defaultGroup)Parse a group from the specified annotation, use the default group name if no group name is specified on the annotationInjectorGroupInfoparseGroup(org.objectweb.asm.tree.MethodNode method, java.lang.String defaultGroup)Parse a group from the specified method, use the default group name if no group name is specified on the annotationvoidvalidateAll()Validate all groups in this collection-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
get
public InjectorGroupInfo get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map<java.lang.String,InjectorGroupInfo>- Overrides:
getin classjava.util.HashMap<java.lang.String,InjectorGroupInfo>
-
forName
public InjectorGroupInfo forName(java.lang.String name)
Get group for the specified name, creates the group in this map if it does not already exist- Parameters:
name- Name of group to fetch- Returns:
- Existing group or new group if none was previously declared
-
parseGroup
public InjectorGroupInfo parseGroup(org.objectweb.asm.tree.MethodNode method, java.lang.String defaultGroup)
Parse a group from the specified method, use the default group name if no group name is specified on the annotation- Parameters:
method- (Possibly) annotated methoddefaultGroup- Default group name to use- Returns:
- Group or NO_GROUP if no group
-
parseGroup
public InjectorGroupInfo parseGroup(org.objectweb.asm.tree.AnnotationNode annotation, java.lang.String defaultGroup)
Parse a group from the specified annotation, use the default group name if no group name is specified on the annotation- Parameters:
annotation- Annotation or nulldefaultGroup- Default group name to use- Returns:
- Group or NO_GROUP if no group
-
validateAll
public void validateAll() throws org.spongepowered.asm.mixin.injection.throwables.InjectionValidationExceptionValidate all groups in this collection- Throws:
org.spongepowered.asm.mixin.injection.throwables.InjectionValidationException- if validation fails
-
-