Prepended com.google to the Java namespace.

Bug: 16507831
Change-Id: I5beee18f63f174e425dc1ab395807b578d5f9477
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen 2014-09-15 17:45:15 -07:00
parent 0a549e3875
commit c01c77a7f2
9 changed files with 11 additions and 11 deletions

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package flatbuffers; package com.google.flatbuffers;
// Class that holds shared constants. // Class that holds shared constants.

View File

@ -14,9 +14,9 @@
* limitations under the License. * 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.util.Arrays;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package flatbuffers; package com.google.flatbuffers;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View File

@ -14,9 +14,9 @@
* limitations under the License. * 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.ByteBuffer;
import java.nio.charset.Charset; import java.nio.charset.Charset;

View File

@ -388,7 +388,7 @@ static bool SaveClass(const Parser &parser, const Definition &def,
code += "package " + namespace_java + ";\n\n"; code += "package " + namespace_java + ";\n\n";
if (needs_imports) { if (needs_imports) {
code += "import java.nio.*;\nimport java.lang.*;\nimport java.util.*;\n"; 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; code += classcode;
auto filename = namespace_dir + kPathSeparator + def.name + ".java"; auto filename = namespace_dir + kPathSeparator + def.name + ".java";

View File

@ -17,7 +17,7 @@
import java.io.*; import java.io.*;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import MyGame.Example.*; import MyGame.Example.*;
import flatbuffers.FlatBufferBuilder; import com.google.flatbuffers.FlatBufferBuilder;
class JavaTest { class JavaTest {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -5,7 +5,7 @@ package MyGame.Example;
import java.nio.*; import java.nio.*;
import java.lang.*; import java.lang.*;
import java.util.*; import java.util.*;
import flatbuffers.*; import com.google.flatbuffers.*;
public class Monster extends Table { 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); } public static Monster getRootAsMonster(ByteBuffer _bb) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (new Monster()).__init(_bb.getInt(_bb.position()) + _bb.position(), _bb); }

View File

@ -5,7 +5,7 @@ package MyGame.Example;
import java.nio.*; import java.nio.*;
import java.lang.*; import java.lang.*;
import java.util.*; import java.util.*;
import flatbuffers.*; import com.google.flatbuffers.*;
public class Test extends Struct { public class Test extends Struct {
public Test __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; } public Test __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }

View File

@ -5,7 +5,7 @@ package MyGame.Example;
import java.nio.*; import java.nio.*;
import java.lang.*; import java.lang.*;
import java.util.*; import java.util.*;
import flatbuffers.*; import com.google.flatbuffers.*;
public class Vec3 extends Struct { public class Vec3 extends Struct {
public Vec3 __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; } public Vec3 __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }