Prepended com.google to the Java namespace.
authorWouter van Oortmerssen <wvo@google.com>
Tue, 16 Sep 2014 00:45:15 +0000 (17:45 -0700)
committerWouter van Oortmerssen <wvo@google.com>
Tue, 16 Sep 2014 00:45:15 +0000 (17:45 -0700)
Bug: 16507831
Change-Id: I5beee18f63f174e425dc1ab395807b578d5f9477
Tested: on Linux.

java/com/google/flatbuffers/Constants.java [moved from java/flatbuffers/Constants.java with 96% similarity]
java/com/google/flatbuffers/FlatBufferBuilder.java [moved from java/flatbuffers/FlatBufferBuilder.java with 99% similarity, mode: 0644]
java/com/google/flatbuffers/Struct.java [moved from java/flatbuffers/Struct.java with 96% similarity, mode: 0644]
java/com/google/flatbuffers/Table.java [moved from java/flatbuffers/Table.java with 97% similarity, mode: 0644]
src/idl_gen_java.cpp
tests/JavaTest.java
tests/MyGame/Example/Monster.java
tests/MyGame/Example/Test.java
tests/MyGame/Example/Vec3.java

similarity index 96%
rename from java/flatbuffers/Constants.java
rename to java/com/google/flatbuffers/Constants.java
index aeb22cc..67585d7 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package flatbuffers;
+package com.google.flatbuffers;
 
 // Class that holds shared constants.
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from java/flatbuffers/FlatBufferBuilder.java
rename to java/com/google/flatbuffers/FlatBufferBuilder.java
index c1fa771..0689818
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package flatbuffers;
+package com.google.flatbuffers;
 
-import static flatbuffers.Constants.*;
+import static com.google.flatbuffers.Constants.*;
 import java.util.Arrays;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
old mode 100755 (executable)
new mode 100644 (file)
similarity index 96%
rename from java/flatbuffers/Struct.java
rename to java/com/google/flatbuffers/Struct.java
index aac25bf..9e6fe4a
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package flatbuffers;
+package com.google.flatbuffers;
 
 import java.nio.ByteBuffer;
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from java/flatbuffers/Table.java
rename to java/com/google/flatbuffers/Table.java
index d48a325..8f83653
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package flatbuffers;
+package com.google.flatbuffers;
 
-import static flatbuffers.Constants.*;
+import static com.google.flatbuffers.Constants.*;
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 
index 7c83056..ba4ca55 100755 (executable)
@@ -388,7 +388,7 @@ static bool SaveClass(const Parser &parser, const Definition &def,
   code += "package " + namespace_java + ";\n\n";
   if (needs_imports) {
     code += "import java.nio.*;\nimport java.lang.*;\nimport java.util.*;\n";
-    code += "import flatbuffers.*;\n\n";
+    code += "import com.google.flatbuffers.*;\n\n";
   }
   code += classcode;
   auto filename = namespace_dir + kPathSeparator + def.name + ".java";
index 43467c3..7fcc937 100755 (executable)
@@ -17,7 +17,7 @@
 import java.io.*;
 import java.nio.ByteBuffer;
 import MyGame.Example.*;
-import flatbuffers.FlatBufferBuilder;
+import com.google.flatbuffers.FlatBufferBuilder;
 
 class JavaTest {
     public static void main(String[] args) {
index f814898..2ba07c9 100755 (executable)
@@ -5,7 +5,7 @@ package MyGame.Example;
 import java.nio.*;
 import java.lang.*;
 import java.util.*;
-import flatbuffers.*;
+import com.google.flatbuffers.*;
 
 public class Monster extends Table {
   public static Monster getRootAsMonster(ByteBuffer _bb) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (new Monster()).__init(_bb.getInt(_bb.position()) + _bb.position(), _bb); }
index fde24e6..52d09c4 100755 (executable)
@@ -5,7 +5,7 @@ package MyGame.Example;
 import java.nio.*;
 import java.lang.*;
 import java.util.*;
-import flatbuffers.*;
+import com.google.flatbuffers.*;
 
 public class Test extends Struct {
   public Test __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
index be5c66b..76e219e 100755 (executable)
@@ -5,7 +5,7 @@ package MyGame.Example;
 import java.nio.*;
 import java.lang.*;
 import java.util.*;
-import flatbuffers.*;
+import com.google.flatbuffers.*;
 
 public class Vec3 extends Struct {
   public Vec3 __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }