mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 07:19:12 +00:00
Fix up all javadoc warnings and errors
This commit is contained in:
1 parent
270fd71bd2
commit
f26bdfca80
6 files changed
+65
-15
No files matched your search
@@ -394,6 +394,8 @@ public class MixinEnvironment {
|
||||
|
||||
/**
|
||||
* Get the phase for this environment
|
||||
*
|
||||
* @return the phase
|
||||
*/
|
||||
public Phase getPhase() {
|
||||
return this.phase;
|
||||
@@ -441,6 +443,8 @@ public class MixinEnvironment {
|
||||
|
||||
/**
|
||||
* Get all registered error handlers for this environment
|
||||
*
|
||||
* @return set of error handler class names
|
||||
*/
|
||||
public Set<String> getErrorHandlerClasses() {
|
||||
return Collections.<String>unmodifiableSet(this.errorHandlers);
|
||||
@@ -448,6 +452,8 @@ public class MixinEnvironment {
|
||||
|
||||
/**
|
||||
* Get the active mixin transformer instance (if any)
|
||||
*
|
||||
* @return active mixin transformer instance
|
||||
*/
|
||||
public Object getActiveTransformer() {
|
||||
return Launch.blackboard.get(MixinEnvironment.TRANSFORMER_KEY);
|
||||
@@ -497,6 +503,8 @@ public class MixinEnvironment {
|
||||
|
||||
/**
|
||||
* Get the current mixin subsystem version
|
||||
*
|
||||
* @return current version
|
||||
*/
|
||||
public String getVersion() {
|
||||
return (String)Launch.blackboard.get(MixinBootstrap.INIT_KEY);
|
||||
@@ -536,6 +544,8 @@ public class MixinEnvironment {
|
||||
/**
|
||||
* Returns (and generates if necessary) the transformer delegation list for
|
||||
* this environment.
|
||||
*
|
||||
* @return current transformer delegation list (read-only)
|
||||
*/
|
||||
public List<IClassTransformer> getTransformers() {
|
||||
if (this.transformers == null) {
|
||||
@@ -548,7 +558,7 @@ public class MixinEnvironment {
|
||||
/**
|
||||
* Adds a transformer to the transformer exclusions list
|
||||
*
|
||||
* @param name
|
||||
* @param name Class transformer exclusion to add
|
||||
*/
|
||||
public void addTransformerExclusion(String name) {
|
||||
MixinEnvironment.excludeTransformers.add(name);
|
||||
@@ -560,7 +570,7 @@ public class MixinEnvironment {
|
||||
/**
|
||||
* Map a class name back to its obfuscated counterpart
|
||||
*
|
||||
* @param className
|
||||
* @param className class name to unmap
|
||||
* @return obfuscated name for the specified deobfuscated reference
|
||||
*/
|
||||
public String unmap(String className) {
|
||||
@@ -662,6 +672,8 @@ public class MixinEnvironment {
|
||||
|
||||
/**
|
||||
* Gets the default environment
|
||||
*
|
||||
* @return the {@link Phase#DEFAULT DEFAULT} environment
|
||||
*/
|
||||
public static MixinEnvironment getDefaultEnvironment() {
|
||||
return MixinEnvironment.getEnvironment(Phase.DEFAULT);
|
||||
@@ -669,6 +681,8 @@ public class MixinEnvironment {
|
||||
|
||||
/**
|
||||
* Gets the current environment
|
||||
*
|
||||
* @return the currently active environment
|
||||
*/
|
||||
public static MixinEnvironment getCurrentEnvironment() {
|
||||
if (MixinEnvironment.currentEnvironment == null) {
|
||||
|
||||
@@ -26,37 +26,52 @@ package org.spongepowered.asm.mixin.extensibility;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Interface for loaded mixin configurations
|
||||
*/
|
||||
public interface IMixinConfig {
|
||||
|
||||
/**
|
||||
* Get the name of the file from which this configuration object was
|
||||
* initialised
|
||||
*
|
||||
* @return the config filename (resource name)
|
||||
*/
|
||||
public abstract String getName();
|
||||
|
||||
/**
|
||||
* Get the package containing all mixin classes
|
||||
*
|
||||
* @return the base package name for this config
|
||||
*/
|
||||
public abstract String getMixinPackage();
|
||||
|
||||
/**
|
||||
* Get the priority
|
||||
*
|
||||
* @return the priority
|
||||
*/
|
||||
public abstract int getPriority();
|
||||
|
||||
/**
|
||||
* Get the companion plugin, if available
|
||||
*
|
||||
* @return the companion plugin instance or null if no plugin
|
||||
*/
|
||||
public abstract IMixinConfigPlugin getPlugin();
|
||||
|
||||
/**
|
||||
* True if this mixin is <em>required</em> (failure to apply a defined mixin
|
||||
* is an <em>error</em> condition).
|
||||
*
|
||||
* @return true if this config is marked as required
|
||||
*/
|
||||
public abstract boolean isRequired();
|
||||
|
||||
/**
|
||||
* Get targets for this configuration
|
||||
*
|
||||
* @return target classes of mixins in this config
|
||||
*/
|
||||
public abstract Set<String> getTargets();
|
||||
|
||||
|
||||
@@ -108,6 +108,8 @@ public class Target {
|
||||
|
||||
/**
|
||||
* Get the original max locals of the method
|
||||
*
|
||||
* @return the original max locals value
|
||||
*/
|
||||
public int getMaxLocals() {
|
||||
return this.maxLocals;
|
||||
@@ -115,6 +117,8 @@ public class Target {
|
||||
|
||||
/**
|
||||
* Get the original max stack of the method
|
||||
*
|
||||
* @return the original max stack value
|
||||
*/
|
||||
public int getMaxStack() {
|
||||
return this.maxStack;
|
||||
@@ -122,6 +126,8 @@ public class Target {
|
||||
|
||||
/**
|
||||
* Get the current max locals of the method
|
||||
*
|
||||
* @return the current max local value
|
||||
*/
|
||||
public int getCurrentMaxLocals() {
|
||||
return this.method.maxLocals;
|
||||
@@ -129,6 +135,8 @@ public class Target {
|
||||
|
||||
/**
|
||||
* Get the current max stack of the method
|
||||
*
|
||||
* @return the current max stack value
|
||||
*/
|
||||
public int getCurrentMaxStack() {
|
||||
return this.method.maxStack;
|
||||
@@ -136,6 +144,8 @@ public class Target {
|
||||
|
||||
/**
|
||||
* Allocate a new local variable for the method
|
||||
*
|
||||
* @return the allocated local index
|
||||
*/
|
||||
public int allocateLocal() {
|
||||
return this.allocateLocals(1);
|
||||
@@ -159,7 +169,6 @@ public class Target {
|
||||
* first stack index of the allocated range
|
||||
*
|
||||
* @param locals number of locals to allocate
|
||||
* @return the first local variable index of the allocated range
|
||||
*/
|
||||
public void addToLocals(int locals) {
|
||||
this.setMaxLocals(this.maxLocals + locals);
|
||||
|
||||
@@ -586,7 +586,7 @@ public class MixinTargetContext implements IReferenceMapperContext {
|
||||
/**
|
||||
* Get shadow methods in this mixin
|
||||
*
|
||||
* @return
|
||||
* @return shadow methods in the mixin
|
||||
*/
|
||||
public List<MethodNode> getShadowMethods() {
|
||||
return this.shadowMethods;
|
||||
@@ -595,7 +595,7 @@ public class MixinTargetContext implements IReferenceMapperContext {
|
||||
/**
|
||||
* Get methods to mixin
|
||||
*
|
||||
* @return
|
||||
* @return non-shadow methods in the mixin
|
||||
*/
|
||||
public List<MethodNode> getMethods() {
|
||||
return this.classNode.methods;
|
||||
@@ -604,7 +604,7 @@ public class MixinTargetContext implements IReferenceMapperContext {
|
||||
/**
|
||||
* Get shadow fields in this mixin
|
||||
*
|
||||
* @return
|
||||
* @return shadow fields in the mixin
|
||||
*/
|
||||
public List<FieldNode> getShadowFields() {
|
||||
return this.shadowFields;
|
||||
@@ -613,7 +613,7 @@ public class MixinTargetContext implements IReferenceMapperContext {
|
||||
/**
|
||||
* Get fields to mixin
|
||||
*
|
||||
* @return
|
||||
* @return non-shadow fields in the mixin
|
||||
*/
|
||||
public List<FieldNode> getFields() {
|
||||
return this.classNode.fields;
|
||||
|
||||
@@ -60,8 +60,10 @@ abstract class TreeInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param classBytes
|
||||
* @param flags
|
||||
* Gets an ASM Tree for the supplied class bytecode
|
||||
*
|
||||
* @param classBytes Class bytecode
|
||||
* @param flags ClassReader flags
|
||||
* @return ASM Tree view of the specified class
|
||||
*/
|
||||
protected static ClassNode getClassNode(byte[] classBytes, int flags) {
|
||||
@@ -72,9 +74,14 @@ abstract class TreeInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param className
|
||||
* @param runTransformers
|
||||
* Loads class bytecode from the classpath
|
||||
*
|
||||
* @param className Name of the class to load
|
||||
* @param runTransformers True to run the loaded bytecode through the
|
||||
* delegate transformer chain
|
||||
* @return Transformed class bytecode for the specified class
|
||||
* @throws ClassNotFoundException if the specified class could not be loaded
|
||||
* @throws IOException if an error occurs whilst reading the specified class
|
||||
*/
|
||||
protected static byte[] loadClass(String className, boolean runTransformers) throws ClassNotFoundException, IOException {
|
||||
String transformedName = className.replace('/', '.');
|
||||
|
||||
@@ -93,16 +93,21 @@ public class PrettyPrinter {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array
|
||||
* @return
|
||||
* Add elements of the array to the output, one per line
|
||||
*
|
||||
* @param array Array of objects to print
|
||||
* @return fluent interface
|
||||
*/
|
||||
public PrettyPrinter add(Object[] array) {
|
||||
return this.add(array, "%s");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array
|
||||
* @return
|
||||
* Add elements of the array to the output, one per line
|
||||
*
|
||||
* @param array Array of objects to print
|
||||
* @param format Format for each row
|
||||
* @return fluent interface
|
||||
*/
|
||||
public PrettyPrinter add(Object[] array, String format) {
|
||||
for (Object element : array) {
|
||||
|
||||
Reference in new issue
Block a user