Explorar el Código

protect 47 no-arg constructors in the jme3-core library (#1228)

Stephen Gold hace 5 años
padre
commit
9d2d393fc3
Se han modificado 42 ficheros con 68 adiciones y 68 borrados
  1. 1 1
      jme3-core/src/main/java/com/jme3/anim/AnimClip.java
  2. 1 1
      jme3-core/src/main/java/com/jme3/anim/Armature.java
  3. 1 1
      jme3-core/src/main/java/com/jme3/anim/MorphTrack.java
  4. 1 1
      jme3-core/src/main/java/com/jme3/anim/SkinningControl.java
  5. 1 1
      jme3-core/src/main/java/com/jme3/animation/Animation.java
  6. 2 2
      jme3-core/src/main/java/com/jme3/animation/AudioTrack.java
  7. 1 1
      jme3-core/src/main/java/com/jme3/animation/Bone.java
  8. 1 1
      jme3-core/src/main/java/com/jme3/animation/BoneTrack.java
  9. 2 2
      jme3-core/src/main/java/com/jme3/animation/EffectTrack.java
  10. 2 2
      jme3-core/src/main/java/com/jme3/animation/Pose.java
  11. 3 3
      jme3-core/src/main/java/com/jme3/animation/PoseTrack.java
  12. 1 1
      jme3-core/src/main/java/com/jme3/animation/Skeleton.java
  13. 1 1
      jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java
  14. 1 1
      jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java
  15. 2 2
      jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java
  16. 1 1
      jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java
  17. 3 3
      jme3-core/src/main/java/com/jme3/light/LightList.java
  18. 2 2
      jme3-core/src/main/java/com/jme3/material/MatParam.java
  19. 2 2
      jme3-core/src/main/java/com/jme3/material/MatParamOverride.java
  20. 1 1
      jme3-core/src/main/java/com/jme3/material/MaterialDef.java
  21. 1 1
      jme3-core/src/main/java/com/jme3/material/TechniqueDef.java
  22. 1 1
      jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java
  23. 2 2
      jme3-core/src/main/java/com/jme3/scene/CameraNode.java
  24. 2 2
      jme3-core/src/main/java/com/jme3/scene/LightNode.java
  25. 2 2
      jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java
  26. 2 2
      jme3-core/src/main/java/com/jme3/scene/debug/Arrow.java
  27. 2 2
      jme3-core/src/main/java/com/jme3/scene/debug/custom/JointShape.java
  28. 2 2
      jme3-core/src/main/java/com/jme3/scene/instancing/InstancedGeometry.java
  29. 2 2
      jme3-core/src/main/java/com/jme3/scene/shape/Box.java
  30. 2 2
      jme3-core/src/main/java/com/jme3/scene/shape/Curve.java
  31. 3 3
      jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java
  32. 1 1
      jme3-core/src/main/java/com/jme3/scene/shape/Dome.java
  33. 2 2
      jme3-core/src/main/java/com/jme3/scene/shape/Quad.java
  34. 2 2
      jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java
  35. 2 2
      jme3-core/src/main/java/com/jme3/scene/shape/StripBox.java
  36. 1 1
      jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java
  37. 2 2
      jme3-core/src/main/java/com/jme3/shadow/PointLightShadowFilter.java
  38. 1 1
      jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java
  39. 1 1
      jme3-core/src/main/java/com/jme3/shadow/PssmShadowFilter.java
  40. 2 2
      jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowFilter.java
  41. 1 1
      jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowRenderer.java
  42. 2 2
      jme3-core/src/main/java/com/jme3/ui/Picture.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/anim/AnimClip.java

@@ -16,7 +16,7 @@ public class AnimClip implements JmeCloneable, Savable {
 
     private AnimTrack[] tracks;
 
-    public AnimClip() {
+    protected AnimClip() {
     }
 
     public AnimClip(String name) {

+ 1 - 1
jme3-core/src/main/java/com/jme3/anim/Armature.java

@@ -28,7 +28,7 @@ public class Armature implements JmeCloneable, Savable {
     /**
      * Serialization only
      */
-    public Armature() {
+    protected Armature() {
     }
 
     /**

+ 1 - 1
jme3-core/src/main/java/com/jme3/anim/MorphTrack.java

@@ -59,7 +59,7 @@ public class MorphTrack implements AnimTrack<float[]> {
     /**
      * Serialization-only. Do not use.
      */
-    public MorphTrack() {
+    protected MorphTrack() {
     }
 
     /**

+ 1 - 1
jme3-core/src/main/java/com/jme3/anim/SkinningControl.java

@@ -115,7 +115,7 @@ public class SkinningControl extends AbstractControl implements Cloneable, JmeCl
     /**
      * Serialization only. Do not use.
      */
-    public SkinningControl() {
+    protected SkinningControl() {
     }
 
     /**

+ 1 - 1
jme3-core/src/main/java/com/jme3/animation/Animation.java

@@ -65,7 +65,7 @@ public class Animation implements Savable, Cloneable, JmeCloneable {
     /**
      * Serialization-only. Do not use.
      */
-    public Animation() {
+    protected Animation() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/animation/AudioTrack.java

@@ -82,9 +82,9 @@ public class AudioTrack implements ClonableTrack {
     }
 
     /**
-     * default constructor for serialization only
+     * constructor for serialization only
      */
-    public AudioTrack() {
+    protected AudioTrack() {
     }
 
     /**

+ 1 - 1
jme3-core/src/main/java/com/jme3/animation/Bone.java

@@ -176,7 +176,7 @@ public final class Bone implements Savable, JmeCloneable {
     /**
      * Serialization only. Do not use.
      */
-    public Bone() {
+    protected Bone() {
     }
     
     @Override   

+ 1 - 1
jme3-core/src/main/java/com/jme3/animation/BoneTrack.java

@@ -65,7 +65,7 @@ public final class BoneTrack implements JmeCloneable, Track {
     /**
      * Serialization-only. Do not use.
      */
-    public BoneTrack() {
+    protected BoneTrack() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/animation/EffectTrack.java

@@ -144,9 +144,9 @@ public class EffectTrack implements ClonableTrack {
     }
 
     /**
-     * default constructor only for serialization
+     * constructor only for serialization
      */
-    public EffectTrack() {
+    protected EffectTrack() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/animation/Pose.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,7 @@ public final class Pose implements Savable, Cloneable {
     /**
      * Serialization-only. Do not use.
      */
-    public Pose()
+    protected Pose()
     {
     }
     

+ 3 - 3
jme3-core/src/main/java/com/jme3/animation/PoseTrack.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ public final class PoseTrack implements Track {
         /**
          * Serialization-only. Do not use.
          */
-        public PoseFrame()
+        protected PoseFrame()
         {
         }
         
@@ -114,7 +114,7 @@ public final class PoseTrack implements Track {
     /**
      * Serialization-only. Do not use.
      */
-    public PoseTrack()
+    protected PoseTrack()
     {
     }
     

+ 1 - 1
jme3-core/src/main/java/com/jme3/animation/Skeleton.java

@@ -121,7 +121,7 @@ public final class Skeleton implements Savable, JmeCloneable {
     /**
      * Serialization only. Do not use.
      */
-    public Skeleton() {
+    protected Skeleton() {
     }
 
     @Override   

+ 1 - 1
jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java

@@ -113,7 +113,7 @@ public class SkeletonControl extends AbstractControl implements Cloneable, JmeCl
     /**
      * Serialization only. Do not use.
      */
-    public SkeletonControl() {
+    protected SkeletonControl() {
     }
 
     private void switchToHardware() {

+ 1 - 1
jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java

@@ -105,7 +105,7 @@ public class Cinematic extends AbstractCinematicEvent implements AppState {
      * Used for serialization creates a cinematic, don't use this constructor
      * directly
      */
-    public Cinematic() {
+    protected Cinematic() {
         super();
     }
 

+ 2 - 2
jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,7 @@ public class AnimationEvent extends AbstractCinematicEvent {
      * used for serialization don't call directly use one of the following
      * constructors
      */
-    public AnimationEvent() {
+    protected AnimationEvent() {
         super();
     }
     

+ 1 - 1
jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java

@@ -297,7 +297,7 @@ public class ParticleEmitter extends Geometry {
     /**
      * For serialization only. Do not use.
      */
-    public ParticleEmitter() {
+    protected ParticleEmitter() {
         super();
         setBatchHint(BatchHint.Never);
     }

+ 3 - 3
jme3-core/src/main/java/com/jme3/light/LightList.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -69,9 +69,9 @@ public final class LightList implements Iterable<Light>, Savable, Cloneable, Jme
     };
 
     /**
-     * Default constructor for serialization. Do not use
+     * constructor for serialization. Do not use
      */
-    public LightList(){
+    protected LightList(){
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/material/MatParam.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -66,7 +66,7 @@ public class MatParam implements Savable, Cloneable {
     /**
      * Serialization only. Do not use.
      */
-    public MatParam() {
+    protected MatParam() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/material/MatParamOverride.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2016 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ public final class MatParamOverride extends MatParam {
     /**
      * Serialization only. Do not use.
      */
-    public MatParamOverride() {
+    protected MatParamOverride() {
         super();
     }
 

+ 1 - 1
jme3-core/src/main/java/com/jme3/material/MaterialDef.java

@@ -59,7 +59,7 @@ public class MaterialDef{
     /**
      * Serialization only. Do not use.
      */
-    public MaterialDef(){
+    protected MaterialDef(){
     }
     
     /**

+ 1 - 1
jme3-core/src/main/java/com/jme3/material/TechniqueDef.java

@@ -181,7 +181,7 @@ public class TechniqueDef implements Savable, Cloneable {
     /**
      * Serialization only. Do not use.
      */
-    public TechniqueDef() {
+    protected TechniqueDef() {
         shaderLanguages = new EnumMap<Shader.ShaderType, String>(Shader.ShaderType.class);
         shaderNames = new EnumMap<Shader.ShaderType, String>(Shader.ShaderType.class);
         defineNames = new ArrayList<String>();

+ 1 - 1
jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java

@@ -99,7 +99,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
      * Don't use this constructor, use {@link #FilterPostProcessor(AssetManager assetManager)}<br>
      * This constructor is used for serialization only
      */
-    public FilterPostProcessor() {
+    protected FilterPostProcessor() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/CameraNode.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@ public class CameraNode extends Node {
     /**
      * Serialization only. Do not use.
      */
-    public CameraNode() {
+    protected CameraNode() {
         super();
     }
 

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/LightNode.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@ public class LightNode extends Node {
     /**
      * Serialization only. Do not use.
      */
-    public LightNode() {
+    protected LightNode() {
     }
 
     public LightNode(String name, Light light) {

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -382,7 +382,7 @@ public class VertexBuffer extends NativeObject implements Savable, Cloneable {
     /**
      * Serialization only. Do not use.
      */
-    public VertexBuffer(){
+    protected VertexBuffer(){
         super();
     }
 

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/debug/Arrow.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ public class Arrow extends Mesh {
     /**
      * Serialization only. Do not use.
      */
-    public Arrow() {
+    protected Arrow() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/debug/custom/JointShape.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2010 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ public class JointShape extends Mesh {
     /**
      * Serialization only. Do not use.
      */
-    public JointShape() {
+    protected JointShape() {
         float width = 1;
         float height = 1;
         setBuffer(Type.Position, 3, new float[]{-width * 0.5f, -width * 0.5f, 0,

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/instancing/InstancedGeometry.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@ public class InstancedGeometry extends Geometry {
     /**
      * Serialization only. Do not use.
      */
-    public InstancedGeometry() {
+    protected InstancedGeometry() {
         super();
         setIgnoreTransform(true);
         setBatchHint(BatchHint.Never);

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/shape/Box.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -130,7 +130,7 @@ public class Box extends AbstractBox {
     /**
      * Empty constructor for serialization only. Do not use.
      */
-    public Box(){
+    protected Box(){
         super();
     }
 

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/shape/Curve.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -55,7 +55,7 @@ public class Curve extends Mesh {
     /**
      * Serialization only. Do not use.
      */
-    public Curve() {
+    protected Curve() {
     }
 
     /**

+ 3 - 3
jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -64,9 +64,9 @@ public class Cylinder extends Mesh {
     private boolean inverted;
 
     /**
-     * Default constructor for serialization only. Do not use.
+     * constructor for serialization only. Do not use.
      */
-    public Cylinder() {
+    protected Cylinder() {
     }
 
     /**

+ 1 - 1
jme3-core/src/main/java/com/jme3/scene/shape/Dome.java

@@ -66,7 +66,7 @@ public class Dome extends Mesh {
     /**
      * Serialization only. Do not use.
      */
-    public Dome() {
+    protected Dome() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/shape/Quad.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2010 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ public class Quad extends Mesh {
     /**
      * Serialization only. Do not use.
      */
-    public Quad(){
+    protected Quad(){
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -84,7 +84,7 @@ public class Sphere extends Mesh {
     /**
      * Serialization only. Do not use.
      */
-    public Sphere() {
+    protected Sphere() {
     }
 
     /**

+ 2 - 2
jme3-core/src/main/java/com/jme3/scene/shape/StripBox.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -124,7 +124,7 @@ public class StripBox extends AbstractBox {
     /**
      * Empty constructor for serialization only. Do not use.
      */
-    public StripBox(){
+    protected StripBox(){
         super();
     }
 

+ 1 - 1
jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java

@@ -77,7 +77,7 @@ public class DirectionalLightShadowRenderer extends AbstractShadowRenderer {
      * DirectionalLightShadowRenderer#DirectionalLightShadowRenderer(AssetManager
      * assetManager, int shadowMapSize, int nbSplits)
      */
-    public DirectionalLightShadowRenderer() {
+    protected DirectionalLightShadowRenderer() {
         super();
     }
 

+ 2 - 2
jme3-core/src/main/java/com/jme3/shadow/PointLightShadowFilter.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ public class PointLightShadowFilter extends AbstractShadowFilter<PointLightShado
      * assetManager, int shadowMapSize)
      * instead.
      */
-    public PointLightShadowFilter() {
+    protected PointLightShadowFilter() {
         super();
     }
 

+ 1 - 1
jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java

@@ -68,7 +68,7 @@ public class PointLightShadowRenderer extends AbstractShadowRenderer {
      * assetManager, int shadowMapSize)
      * instead.
      */
-    public PointLightShadowRenderer() {
+    protected PointLightShadowRenderer() {
         super();
     }
 

+ 1 - 1
jme3-core/src/main/java/com/jme3/shadow/PssmShadowFilter.java

@@ -75,7 +75,7 @@ public class PssmShadowFilter extends Filter {
      * assetManager, int size, int nbSplits)
      * instead.
      */
-    public PssmShadowFilter() {
+    protected PssmShadowFilter() {
         super();
     }
     

+ 2 - 2
jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowFilter.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ public class SpotLightShadowFilter extends AbstractShadowFilter<SpotLightShadowR
      * int shadowMapSize)
      * instead.
      */
-    public SpotLightShadowFilter() {
+    protected SpotLightShadowFilter() {
         super();
     }
     

+ 1 - 1
jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowRenderer.java

@@ -73,7 +73,7 @@ public class SpotLightShadowRenderer extends AbstractShadowRenderer {
     /**
      * Used for serialization use SpotLightShadowRenderer#SpotLightShadowRenderer(AssetManager assetManager, int shadowMapSize)
      */
-    public SpotLightShadowRenderer() {
+    protected SpotLightShadowRenderer() {
         super();
     }
     

+ 2 - 2
jme3-core/src/main/java/com/jme3/ui/Picture.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ public class Picture extends Geometry {
     /*
      * Serialization only. Do not use.
      */
-    public Picture(){
+    protected Picture(){
     }
 
     /**