final variables and parameters
This commit is contained in:
@@ -22,7 +22,7 @@ package appeng.integration;
|
||||
public class IntegrationHelper
|
||||
{
|
||||
|
||||
public static void testClassExistence( Object o, Class<?> clz )
|
||||
public static void testClassExistence( final Object o, final Class<?> clz )
|
||||
{
|
||||
clz.isInstance( o );
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class IntegrationNode
|
||||
Object instance;
|
||||
IIntegrationModule mod = null;
|
||||
|
||||
public IntegrationNode( String displayName, String modID, IntegrationType shortName, String name )
|
||||
public IntegrationNode( final String displayName, final String modID, final IntegrationType shortName, final String name )
|
||||
{
|
||||
this.displayName = displayName;
|
||||
this.shortName = shortName;
|
||||
@@ -66,7 +66,7 @@ public final class IntegrationNode
|
||||
return this.state != IntegrationStage.FAILED;
|
||||
}
|
||||
|
||||
void call( IntegrationStage stage )
|
||||
void call( final IntegrationStage stage )
|
||||
{
|
||||
if( this.state != IntegrationStage.FAILED )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public final class IntegrationNode
|
||||
boolean enabled = this.modID == null || Loader.isModLoaded( this.modID ) || apiManager.hasAPI( this.modID );
|
||||
|
||||
AEConfig.instance.addCustomCategoryComment( "ModIntegration", "Valid Values are 'AUTO', 'ON', or 'OFF' - defaults to 'AUTO' ; Suggested that you leave this alone unless your experiencing an issue, or wish to disable the integration for a reason." );
|
||||
String mode = AEConfig.instance.get( "ModIntegration", this.displayName.replace( " ", "" ), "AUTO" ).getString();
|
||||
final String mode = AEConfig.instance.get( "ModIntegration", this.displayName.replace( " ", "" ), "AUTO" ).getString();
|
||||
|
||||
if( mode.toUpperCase().equals( "ON" ) )
|
||||
{
|
||||
@@ -99,7 +99,7 @@ public final class IntegrationNode
|
||||
{
|
||||
this.classValue = this.getClass().getClassLoader().loadClass( this.name );
|
||||
this.mod = (IIntegrationModule) this.classValue.getConstructor().newInstance();
|
||||
Field f = this.classValue.getField( "instance" );
|
||||
final Field f = this.classValue.getField( "instance" );
|
||||
f.set( this.classValue, this.instance = this.mod );
|
||||
}
|
||||
else
|
||||
@@ -125,7 +125,7 @@ public final class IntegrationNode
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( final Throwable t )
|
||||
{
|
||||
this.failedStage = stage;
|
||||
this.exception = t;
|
||||
|
||||
@@ -36,7 +36,7 @@ public enum IntegrationRegistry
|
||||
|
||||
private final Collection<IntegrationNode> modules = new LinkedList<IntegrationNode>();
|
||||
|
||||
public void add( IntegrationType type )
|
||||
public void add( final IntegrationType type )
|
||||
{
|
||||
if( type.side == IntegrationSide.CLIENT && FMLLaunchHandler.side() == Side.SERVER )
|
||||
{
|
||||
@@ -53,12 +53,12 @@ public enum IntegrationRegistry
|
||||
|
||||
public void init()
|
||||
{
|
||||
for( IntegrationNode node : this.modules )
|
||||
for( final IntegrationNode node : this.modules )
|
||||
{
|
||||
node.call( IntegrationStage.PRE_INIT );
|
||||
}
|
||||
|
||||
for( IntegrationNode node : this.modules )
|
||||
for( final IntegrationNode node : this.modules )
|
||||
{
|
||||
node.call( IntegrationStage.INIT );
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public enum IntegrationRegistry
|
||||
|
||||
public void postInit()
|
||||
{
|
||||
for( IntegrationNode node : this.modules )
|
||||
for( final IntegrationNode node : this.modules )
|
||||
{
|
||||
node.call( IntegrationStage.POST_INIT );
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public enum IntegrationRegistry
|
||||
{
|
||||
final StringBuilder builder = new StringBuilder( this.modules.size() * 3 );
|
||||
|
||||
for( IntegrationNode node : this.modules )
|
||||
for( final IntegrationNode node : this.modules )
|
||||
{
|
||||
if( builder.length() != 0 )
|
||||
{
|
||||
@@ -90,9 +90,9 @@ public enum IntegrationRegistry
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public boolean isEnabled( IntegrationType name )
|
||||
public boolean isEnabled( final IntegrationType name )
|
||||
{
|
||||
for( IntegrationNode node : this.modules )
|
||||
for( final IntegrationNode node : this.modules )
|
||||
{
|
||||
if( node.shortName == name )
|
||||
{
|
||||
@@ -103,9 +103,9 @@ public enum IntegrationRegistry
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public Object getInstance( IntegrationType name )
|
||||
public Object getInstance( final IntegrationType name )
|
||||
{
|
||||
for( IntegrationNode node : this.modules )
|
||||
for( final IntegrationNode node : this.modules )
|
||||
{
|
||||
if( node.shortName == name && node.isActive() )
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ public enum IntegrationType
|
||||
public final String dspName;
|
||||
public final String modID;
|
||||
|
||||
IntegrationType( IntegrationSide side, String name, String modid )
|
||||
IntegrationType( final IntegrationSide side, final String name, final String modid )
|
||||
{
|
||||
this.side = side;
|
||||
this.dspName = name;
|
||||
|
||||
Reference in New Issue
Block a user