First iteration of making integrations typesafe

This commit is contained in:
yueh
2015-08-06 16:01:56 +02:00
committed by thatsIch
parent cdcba63c2d
commit 0d25b76b77
45 changed files with 446 additions and 170 deletions
@@ -24,6 +24,8 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import appeng.integration.IntegrationType;
public @interface Integration
{
@@ -41,7 +43,7 @@ public @interface Integration
{
String iface();
String iname();
IntegrationType iname();
}
@@ -49,6 +51,6 @@ public @interface Integration
@Target( ElementType.METHOD )
@interface Method
{
String iname();
IntegrationType iname();
}
}
@@ -183,11 +183,11 @@ public final class ASMIntegration implements IClassTransformer
if( an.values.get( 0 ).equals( "iname" ) )
{
iName = (String) an.values.get( 1 );
iName = ( (String[]) an.values.get( 1 ) )[1];
}
else if( an.values.get( 2 ).equals( "iname" ) )
{
iName = (String) an.values.get( 3 );
iName = ( (String[]) an.values.get( 3 ) )[1];
}
if( iName != null && iFace != null )
@@ -223,7 +223,7 @@ public final class ASMIntegration implements IClassTransformer
if( an.values.get( 0 ).equals( "iname" ) )
{
iName = (String) an.values.get( 1 );
iName = ( (String[]) an.values.get( 1 ) )[1];
}
if( iName != null )