diff options
author | Sven Gothel <[email protected]> | 2014-07-08 23:15:33 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-08 23:15:33 +0200 |
commit | 27115b5f050e881f959a33c04e7d3988bfe676bf (patch) | |
tree | 94668f339d3de88be355a20bd541c1aa4bb7403d /src/jogl/classes | |
parent | a2b75f52db38be223261cd378a4bc330cc2d3ede (diff) |
Findbugs: Use inner static class where possible
Diffstat (limited to 'src/jogl/classes')
12 files changed, 68 insertions, 67 deletions
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java index af7694ce1..f00f61116 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java @@ -253,7 +253,7 @@ public class BuildComposablePipeline { } //------------------------------------------------------- - protected class PlainMethod { + protected static class PlainMethod { Method m; boolean runHooks; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index 7a3962f7c..5bd49dce9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -33,7 +33,7 @@ import com.jogamp.graph.font.Font; import com.jogamp.opengl.math.geom.AABBox; public class TypecastGlyph implements Font.Glyph { - public class Advance + public static class Advance { private final Font font; private final float advance; @@ -87,7 +87,7 @@ public class TypecastGlyph implements Font.Glyph { } } - public class Metrics + public static class Metrics { private final AABBox bbox; private final Advance advance; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java index 49ab1d474..002f83e9b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java @@ -32,14 +32,14 @@ import java.io.IOException; */ public class BaseTable implements Table { - private abstract class BaseCoord { + abstract class BaseCoord { - public abstract int getBaseCoordFormat(); + abstract int getBaseCoordFormat(); - public abstract short getCoordinate(); + abstract short getCoordinate(); } - private class BaseCoordFormat1 extends BaseCoord { + class BaseCoordFormat1 extends BaseCoord { private final short _coordinate; @@ -48,87 +48,87 @@ public class BaseTable implements Table { } @Override - public int getBaseCoordFormat() { + int getBaseCoordFormat() { return 1; } @Override - public short getCoordinate() { + short getCoordinate() { return _coordinate; } } - private class BaseCoordFormat2 extends BaseCoord { + class BaseCoordFormat2 extends BaseCoord { private final short _coordinate; - private final int _referenceGlyph; - private final int _baseCoordPoint; + // private final int _referenceGlyph; + // private final int _baseCoordPoint; protected BaseCoordFormat2(final DataInput di) throws IOException { _coordinate = di.readShort(); - _referenceGlyph = di.readUnsignedShort(); - _baseCoordPoint = di.readUnsignedShort(); + /* _referenceGlyph = */ di.readUnsignedShort(); + /* _baseCoordPoint = */ di.readUnsignedShort(); } @Override - public int getBaseCoordFormat() { + int getBaseCoordFormat() { return 2; } @Override - public short getCoordinate() { + short getCoordinate() { return _coordinate; } } - private class BaseCoordFormat3 extends BaseCoord { + class BaseCoordFormat3 extends BaseCoord { private final short _coordinate; - private final int _deviceTableOffset; + // private final int _deviceTableOffset; protected BaseCoordFormat3(final DataInput di) throws IOException { _coordinate = di.readShort(); - _deviceTableOffset = di.readUnsignedShort(); + /* _deviceTableOffset = */ di.readUnsignedShort(); } @Override - public int getBaseCoordFormat() { + int getBaseCoordFormat() { return 2; } @Override - public short getCoordinate() { + short getCoordinate() { return _coordinate; } } - private class FeatMinMaxRecord { + static class FeatMinMaxRecord { - private final int _tag; - private final int _minCoordOffset; - private final int _maxCoordOffset; + // private final int _tag; + // private final int _minCoordOffset; + // private final int _maxCoordOffset; protected FeatMinMaxRecord(final DataInput di) throws IOException { - _tag = di.readInt(); - _minCoordOffset = di.readUnsignedShort(); - _maxCoordOffset = di.readUnsignedShort(); + /* _tag = */ di.readInt(); + /* _minCoordOffset = */ di.readUnsignedShort(); + /* _maxCoordOffset = */ di.readUnsignedShort(); } } - private class MinMax { + class MinMax { - private final int _minCoordOffset; - private final int _maxCoordOffset; + // private final int _minCoordOffset; + // private final int _maxCoordOffset; private final int _featMinMaxCount; private final FeatMinMaxRecord[] _featMinMaxRecord; protected MinMax(final int minMaxOffset) throws IOException { final DataInput di = getDataInputForOffset(minMaxOffset); - _minCoordOffset = di.readUnsignedShort(); - _maxCoordOffset = di.readUnsignedShort(); + /* _minCoordOffset = */ di.readUnsignedShort(); + /* _maxCoordOffset = */ di.readUnsignedShort(); _featMinMaxCount = di.readUnsignedShort(); _featMinMaxRecord = new FeatMinMaxRecord[_featMinMaxCount]; for (int i = 0; i < _featMinMaxCount; ++i) { @@ -137,16 +137,16 @@ public class BaseTable implements Table { } } - private class BaseValues { + class BaseValues { - private final int _defaultIndex; + // private final int _defaultIndex; private final int _baseCoordCount; private final int[] _baseCoordOffset; private final BaseCoord[] _baseCoords; protected BaseValues(final int baseValuesOffset) throws IOException { final DataInput di = getDataInputForOffset(baseValuesOffset); - _defaultIndex = di.readUnsignedShort(); + /* _defaultIndex = */ di.readUnsignedShort(); _baseCoordCount = di.readUnsignedShort(); _baseCoordOffset = new int[_baseCoordCount]; for (int i = 0; i < _baseCoordCount; ++i) { @@ -170,26 +170,27 @@ public class BaseTable implements Table { } } - private class BaseLangSysRecord { + static class BaseLangSysRecord { - private final int _baseLangSysTag; + // private final int _baseLangSysTag; private final int _minMaxOffset; protected BaseLangSysRecord(final DataInput di) throws IOException { - _baseLangSysTag = di.readInt(); + /* _baseLangSysTag = */ di.readInt(); _minMaxOffset = di.readUnsignedShort(); } - public int getBaseLangSysTag() { + /** + int getBaseLangSysTag() { return _baseLangSysTag; - } + } */ - public int getMinMaxOffset() { + int getMinMaxOffset() { return _minMaxOffset; } } - private class BaseScript { + class BaseScript { private final int _thisOffset; private final int _baseValuesOffset; @@ -239,7 +240,7 @@ public class BaseTable implements Table { } } - private class BaseScriptRecord { + static class BaseScriptRecord { private final int _baseScriptTag; private final int _baseScriptOffset; @@ -249,16 +250,16 @@ public class BaseTable implements Table { _baseScriptOffset = di.readUnsignedShort(); } - public int getBaseScriptTag() { + int getBaseScriptTag() { return _baseScriptTag; } - public int getBaseScriptOffset() { + int getBaseScriptOffset() { return _baseScriptOffset; } } - private class BaseScriptList { + class BaseScriptList { private final int _thisOffset; private final int _baseScriptCount; @@ -297,7 +298,7 @@ public class BaseTable implements Table { } } - private class BaseTagList { + class BaseTagList { private final int _thisOffset; private final int _baseTagCount; @@ -325,7 +326,7 @@ public class BaseTable implements Table { } } - private class Axis { + class Axis { private final int _thisOffset; private final int _baseTagListOffset; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java index 541c280bc..d6643f26d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java @@ -37,7 +37,7 @@ import java.util.Hashtable; */ public class CffTable implements Table { - public class Dict { + public static class Dict { private final Dictionary<Integer, Object> _entries = new Hashtable<Integer, Object>(); private final int[] _data; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java index f29583ec4..602897382 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java @@ -59,7 +59,7 @@ import java.io.IOException; */ public abstract class CmapFormat { - public class Range { + public static class Range { private final int _startCode; private final int _endCode; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java index e57e509b4..743fc93c1 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java @@ -60,7 +60,7 @@ import java.io.IOException; */ public class CmapFormat2 extends CmapFormat { - private class SubHeader { + static class SubHeader { int _firstCode; int _entryCount; short _idDelta; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java index c3b875a2c..2bd51c124 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java @@ -31,7 +31,7 @@ import java.io.IOException; */ public class HdmxTable implements Table { - public class DeviceRecord { + public static class DeviceRecord { private final short _pixelSize; private final short _maxWidth; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java index 1a390f86d..679502e84 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java @@ -30,7 +30,7 @@ import java.io.IOException; */ public class VdmxTable implements Table { - private class Ratio { + static class Ratio { private final byte _bCharSet; private final byte _xRatio; @@ -61,7 +61,7 @@ public class VdmxTable implements Table { } } - private class VTableRecord { + static class VTableRecord { private final int _yPelHeight; private final short _yMax; @@ -86,7 +86,7 @@ public class VdmxTable implements Table { } } - private class Group { + static class Group { private final int _recs; private final int _startsz; diff --git a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java index 3b79c28b6..191b191b5 100644 --- a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java +++ b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java @@ -82,7 +82,7 @@ public final class Path2D implements Cloneable { /* * GeneralPath path iterator */ - class Iterator implements PathIterator { + static class Iterator implements PathIterator { /** * The current cursor position in types buffer diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java index 6017c94e4..bc88d9ca9 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java @@ -175,7 +175,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { } // NSOpenGLPixelBuffer implementation - class NSOpenGLImpl implements GLBackendImpl { + static class NSOpenGLImpl implements GLBackendImpl { @Override public long create(final int renderTarget, final int internalFormat, final int width, final int height) { return CGL.createPBuffer(renderTarget, internalFormat, width, height); @@ -188,7 +188,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { } // CGL implementation - class CGLImpl implements GLBackendImpl { + static class CGLImpl implements GLBackendImpl { @Override public long create(final int renderTarget, final int internalFormat, final int width, final int height) { final PointerBuffer pbuffer = PointerBuffer.allocateDirect(1); diff --git a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java index f73de75c5..e3e43b30c 100644 --- a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java +++ b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java @@ -373,7 +373,7 @@ public class JPEGDecoder { } /** The JPEG encoded components */ - class ComponentIn { + static class ComponentIn { final int h, v; /** index to frame.qtt[] */ final int qttIdx; @@ -414,7 +414,7 @@ public class JPEGDecoder { } /** The decoded components */ - class ComponentOut { + static class ComponentOut { private final ArrayList<byte[]> lines; final float scaleX; final float scaleY; @@ -760,7 +760,7 @@ public class JPEGDecoder { frame.mcusPerColumn = mcusPerColumn; } - private static class BinObjIdxed { + static class BinObjIdxed { final BinObj children; byte index; BinObjIdxed() { @@ -768,7 +768,7 @@ public class JPEGDecoder { this.index = 0; } } - private static class BinObj { + static class BinObj { final boolean isValue; final BinObj[] tree; final byte b; @@ -827,7 +827,7 @@ public class JPEGDecoder { } private final Output output = new Output(); - private static class Output { + static class Output { private int blocksPerLine; private int blocksPerColumn; private int samplesPerLine; @@ -1023,11 +1023,11 @@ public class JPEGDecoder { } } - private static interface DecoderFunction { + static interface DecoderFunction { void decode(ComponentIn component, int[] zz) throws IOException; } - private class Decoder { + class Decoder { // private int precision; // private int samplesPerLine; // private int scanLines; diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java index 2076ce454..d2f967a5c 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java @@ -104,7 +104,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable { throw new GLException("Should not call this"); } - class Context extends X11GLXContext { + static class Context extends X11GLXContext { Context(final X11GLXDrawable drawable, final GLContext shareWith) { super(drawable, shareWith); } |