Reduces visibility of internal fields/methods

Reduces the visibility of all fields to private and create setters/getters
when necessary. Exceptions are fields with GuiSync as these need to be
public.

Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
yueh
2015-10-08 15:42:42 +02:00
parent f054bd699b
commit e94a0cfccf
497 changed files with 7865 additions and 6908 deletions
+10 -5
View File
@@ -44,7 +44,7 @@ import appeng.me.GridNode;
public class SecurityCache implements ISecurityGrid
{
public final IGrid myGrid;
private final IGrid myGrid;
private final List<ISecurityProvider> securityProvider = new ArrayList<ISecurityProvider>();
private final HashMap<Integer, EnumSet<SecurityPermissions>> playerPerms = new HashMap<Integer, EnumSet<SecurityPermissions>>();
private long securityKey = -1;
@@ -102,10 +102,10 @@ public class SecurityCache implements ISecurityGrid
if( lastCode != this.securityKey )
{
this.myGrid.postEvent( new MENetworkSecurityChange() );
for( final IGridNode n : this.myGrid.getNodes() )
this.getGrid().postEvent( new MENetworkSecurityChange() );
for( final IGridNode n : this.getGrid().getNodes() )
{
( (GridNode) n ).lastSecurityKey = this.securityKey;
( (GridNode) n ).setLastSecurityKey( this.securityKey );
}
}
}
@@ -120,7 +120,7 @@ public class SecurityCache implements ISecurityGrid
}
else
{
( (GridNode) gridNode ).lastSecurityKey = this.securityKey;
( (GridNode) gridNode ).setLastSecurityKey( this.securityKey );
}
}
@@ -193,4 +193,9 @@ public class SecurityCache implements ISecurityGrid
}
return -1;
}
public IGrid getGrid()
{
return this.myGrid;
}
}