Changed access to use this qualifier

This commit is contained in:
yueh
2014-12-29 15:13:47 +01:00
parent 2a5e57a59b
commit f471513bd0
604 changed files with 11573 additions and 11573 deletions
@@ -80,7 +80,7 @@ public class ASMIntegration implements IClassTransformer
try
{
boolean reWrite = removeOptionals( classNode );
boolean reWrite = this.removeOptionals( classNode );
if ( reWrite )
{
@@ -105,16 +105,16 @@ public class ASMIntegration implements IClassTransformer
{
for ( AnnotationNode an : classNode.visibleAnnotations )
{
if ( hasAnnotation( an, integration.Interface.class ) )
if ( this.hasAnnotation( an, integration.Interface.class ) )
{
if ( stripInterface( classNode, integration.Interface.class, an ) )
if ( this.stripInterface( classNode, integration.Interface.class, an ) )
changed = true;
}
else if ( hasAnnotation( an, integration.InterfaceList.class ) )
else if ( this.hasAnnotation( an, integration.InterfaceList.class ) )
{
for ( Object o : ( ( List ) an.values.get( 1 ) ) )
{
if ( stripInterface( classNode, integration.InterfaceList.class, ( AnnotationNode ) o ) )
if ( this.stripInterface( classNode, integration.InterfaceList.class, ( AnnotationNode ) o ) )
changed = true;
}
}
@@ -130,9 +130,9 @@ public class ASMIntegration implements IClassTransformer
{
for ( AnnotationNode an : mn.visibleAnnotations )
{
if ( hasAnnotation( an, integration.Method.class ) )
if ( this.hasAnnotation( an, integration.Method.class ) )
{
if ( stripMethod( classNode, mn, i, integration.Method.class, an ) )
if ( this.stripMethod( classNode, mn, i, integration.Method.class, an ) )
changed = true;
}
}
@@ -141,7 +141,7 @@ public class ASMIntegration implements IClassTransformer
}
if ( changed )
log( "Updated " + classNode.name );
this.log( "Updated " + classNode.name );
return changed;
}
@@ -166,12 +166,12 @@ public class ASMIntegration implements IClassTransformer
IntegrationType type = IntegrationType.valueOf( iName );
if ( !IntegrationRegistry.INSTANCE.isEnabled( type ) )
{
log( "Removing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is disabled." );
this.log( "Removing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is disabled." );
i.remove();
return true;
}
else
log( "Allowing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is enabled." );
this.log( "Allowing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is enabled." );
}
else
throw new RuntimeException( "Unable to handle Method annotation on " + classNode.name );
@@ -203,12 +203,12 @@ public class ASMIntegration implements IClassTransformer
{
if ( !IntegrationRegistry.INSTANCE.isEnabled( type ) )
{
log( "Removing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is disabled." );
this.log( "Removing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is disabled." );
classNode.interfaces.remove( iFace.replace( '.', '/' ) );
return true;
}
else
log( "Allowing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is enabled." );
this.log( "Allowing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is enabled." );
}
else
throw new RuntimeException( "Unable to handle Method annotation on " + classNode.name );
@@ -56,16 +56,16 @@ public class ASMTweaker implements IClassTransformer
final Multimap<String, publicLine> privateToPublicMethods = HashMultimap.create();
public ASMTweaker() {
privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "func_146977_a", "(Lnet/minecraft/inventory/Slot;)V" ) );
privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "a", "(Lzk;)V" ) );
this.privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "func_146977_a", "(Lnet/minecraft/inventory/Slot;)V" ) );
this.privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "a", "(Lzk;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "writeToNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145841_b", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "b", "(Ldh;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "writeToNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145841_b", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "b", "(Ldh;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "readFromNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145839_a", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "a", "(Ldh;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "readFromNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145839_a", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "a", "(Ldh;)V" ) );
}
@Override
@@ -76,15 +76,15 @@ public class ASMTweaker implements IClassTransformer
try
{
if ( transformedName != null && privateToPublicMethods.containsKey( transformedName ) )
if ( transformedName != null && this.privateToPublicMethods.containsKey( transformedName ) )
{
ClassNode classNode = new ClassNode();
ClassReader classReader = new ClassReader( basicClass );
classReader.accept( classNode, 0 );
for (publicLine Set : privateToPublicMethods.get( transformedName ))
for (publicLine Set : this.privateToPublicMethods.get( transformedName ))
{
makePublic( classNode, Set );
this.makePublic( classNode, Set );
}
// CALL VIRTUAL!
@@ -99,7 +99,7 @@ public class ASMTweaker implements IClassTransformer
newNode.instructions.add( new VarInsnNode( Opcodes.ALOAD, 1 ) );
newNode.instructions.add( new MethodInsnNode( Opcodes.INVOKESPECIAL, classNode.name, mn.name, mn.desc, false ) );
newNode.instructions.add( new InsnNode( Opcodes.RETURN ) );
log( newNode.name + newNode.desc + " - New Method" );
this.log( newNode.name + newNode.desc + " - New Method" );
classNode.methods.add( newNode );
break;
}
@@ -118,7 +118,7 @@ public class ASMTweaker implements IClassTransformer
MethodInsnNode n = (MethodInsnNode) in;
if ( n.name.equals( "func_146977_a" ) || (n.name.equals( "a" ) && n.desc.equals( "(Lzk;)V" )) )
{
log( n.name + n.desc + " - Invoke Virtual" );
this.log( n.name + n.desc + " - Invoke Virtual" );
mn.instructions.insertBefore( n, new MethodInsnNode( Opcodes.INVOKEVIRTUAL, n.owner, n.name, n.desc, false ) );
mn.instructions.remove( in );
break;
@@ -153,7 +153,7 @@ public class ASMTweaker implements IClassTransformer
if ( mn.name.equals( set.name ) && mn.desc.equals( set.desc ) )
{
mn.access = (mn.access & (~(Opcodes.ACC_FINAL | Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED))) | Opcodes.ACC_PUBLIC;
log( mn.name + mn.desc + " - Transformed" );
this.log( mn.name + mn.desc + " - Transformed" );
}
}
}