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
+14 -9
View File
@@ -28,53 +28,58 @@ import appeng.api.networking.IGridStorage;
public class GridCacheWrapper implements IGridCache
{
final IGridCache myCache;
final String name;
private final IGridCache myCache;
private final String name;
public GridCacheWrapper( final IGridCache gc )
{
this.myCache = gc;
this.name = this.myCache.getClass().getName();
this.name = this.getCache().getClass().getName();
}
@Override
public void onUpdateTick()
{
this.myCache.onUpdateTick();
this.getCache().onUpdateTick();
}
@Override
public void removeNode( final IGridNode gridNode, final IGridHost machine )
{
this.myCache.removeNode( gridNode, machine );
this.getCache().removeNode( gridNode, machine );
}
@Override
public void addNode( final IGridNode gridNode, final IGridHost machine )
{
this.myCache.addNode( gridNode, machine );
this.getCache().addNode( gridNode, machine );
}
@Override
public void onSplit( final IGridStorage storageB )
{
this.myCache.onSplit( storageB );
this.getCache().onSplit( storageB );
}
@Override
public void onJoin( final IGridStorage storageB )
{
this.myCache.onJoin( storageB );
this.getCache().onJoin( storageB );
}
@Override
public void populateGridStorage( final IGridStorage storage )
{
this.myCache.populateGridStorage( storage );
this.getCache().populateGridStorage( storage );
}
public String getName()
{
return this.name;
}
IGridCache getCache()
{
return this.myCache;
}
}