[gbc] Update SchemaDef struct full name in Java
Make the full name use the IDL namespace (as in C++ and C#).
This commit is contained in:
Родитель
4c5cf29b6b
Коммит
9e4c9e4241
|
@ -470,7 +470,7 @@ package #{javaPackage};
|
|||
javaPackage = sepBy "." toText $ getNamespace java
|
||||
|
||||
-- struct -> Java class
|
||||
typeDefinition Struct {..} = [lt|
|
||||
typeDefinition s@Struct {..} = [lt|
|
||||
#{generatedClassAnnotations}
|
||||
public class #{typeNameWithParams declName declParams}#{maybe interface baseClass structBase} {
|
||||
#{ifThenElse (null declParams) mempty (makeStructMember_GenericBondTypeBuilder declName declParams)}
|
||||
|
@ -484,6 +484,16 @@ public class #{typeNameWithParams declName declParams}#{maybe interface baseClas
|
|||
}
|
||||
#{makeStructBondTypeMember_initialize java declParams structFields structBase}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "#{declName}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "#{qualifiedDeclaredTypeName java s}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<#{typeNameWithParams declName declParams}> getValueClass() {
|
||||
return (java.lang.Class<#{typeNameWithParams declName declParams}>) (java.lang.Class) #{declName}.class;
|
||||
|
|
|
@ -49,6 +49,16 @@ public class Foo<T> implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.aa);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Foo<T>> getValueClass() {
|
||||
return (java.lang.Class<Foo<T>>) (java.lang.Class) Foo.class;
|
||||
|
@ -254,6 +264,16 @@ public class WrappingAnEnum implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.aWrappedEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "WrappingAnEnum";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.WrappingAnEnum";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<WrappingAnEnum> getValueClass() {
|
||||
return (java.lang.Class<WrappingAnEnum>) (java.lang.Class) WrappingAnEnum.class;
|
||||
|
|
|
@ -105,6 +105,16 @@ public class Foo implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Foo> getValueClass() {
|
||||
return (java.lang.Class<Foo>) (java.lang.Class) Foo.class;
|
||||
|
|
|
@ -74,6 +74,16 @@ public class BasicTypes implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this._bool, this._str, this._wstr, this._uint64, this._uint16, this._uint32, this._uint8, this._int8, this._int16, this._int32, this._int64, this._double, this._float, this._blob);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "BasicTypes";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.BasicTypes";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<BasicTypes> getValueClass() {
|
||||
return (java.lang.Class<BasicTypes>) (java.lang.Class) BasicTypes.class;
|
||||
|
|
|
@ -38,6 +38,16 @@ public class HasMetaFields implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.full_name, this.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "HasMetaFields";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "deprecated.bondmeta.HasMetaFields";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<HasMetaFields> getValueClass() {
|
||||
return (java.lang.Class<HasMetaFields>) (java.lang.Class) HasMetaFields.class;
|
||||
|
|
|
@ -34,6 +34,16 @@ public class Foo implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Foo> getValueClass() {
|
||||
return (java.lang.Class<Foo>) (java.lang.Class) Foo.class;
|
||||
|
@ -166,6 +176,16 @@ public class ComplexTypes implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.li8, this.sb, this.vb, this.nf, this.msws, this.bfoo, this.m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "ComplexTypes";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.ComplexTypes";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<ComplexTypes> getValueClass() {
|
||||
return (java.lang.Class<ComplexTypes>) (java.lang.Class) ComplexTypes.class;
|
||||
|
|
|
@ -258,6 +258,16 @@ public class Foo implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.m_bool_1, this.m_bool_2, this.m_bool_3, this.m_str_1, this.m_str_2, this.m_int8_4, this.m_int8_5, this.m_int16_4, this.m_int16_5, this.m_int32_4, this.m_int32_max, this.m_int64_4, this.m_int64_max, this.m_uint8_2, this.m_uint8_3, this.m_uint16_2, this.m_uint16_3, this.m_uint32_3, this.m_uint32_max, this.m_uint64_3, this.m_uint64_max, this.m_double_3, this.m_double_4, this.m_double_5, this.m_float_3, this.m_float_4, this.m_float_7, this.m_enum1, this.m_enum2, this.m_enum3, this.m_enum_int32min, this.m_enum_int32max, this.m_enum_uint32_min, this.m_enum_uint32_max, this.m_wstr_1, this.m_wstr_2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Foo> getValueClass() {
|
||||
return (java.lang.Class<Foo>) (java.lang.Class) Foo.class;
|
||||
|
|
|
@ -41,6 +41,16 @@ public class Foo implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.o, this.r, this.ro);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Foo> getValueClass() {
|
||||
return (java.lang.Class<Foo>) (java.lang.Class) Foo.class;
|
||||
|
|
|
@ -54,6 +54,16 @@ public class Foo<T1, T2> implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.t2, this.n);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Foo<T1, T2>> getValueClass() {
|
||||
return (java.lang.Class<Foo<T1, T2>>) (java.lang.Class) Foo.class;
|
||||
|
|
|
@ -35,6 +35,16 @@ public class Base implements com.microsoft.bond.BondSerializable {
|
|||
super.initializeBaseAndFields(null, this.x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Base";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Base";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Base> getValueClass() {
|
||||
return (java.lang.Class<Base>) (java.lang.Class) Base.class;
|
||||
|
@ -161,6 +171,16 @@ public class Foo extends tests.Base {
|
|||
super.initializeBaseAndFields((com.microsoft.bond.StructBondType<tests.Base>) getStructType(tests.Base.class), this.x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
return "tests.Foo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final java.lang.Class<Foo> getValueClass() {
|
||||
return (java.lang.Class<Foo>) (java.lang.Class) Foo.class;
|
||||
|
|
|
@ -245,18 +245,6 @@ public abstract class StructBondType<TStruct extends BondSerializable>
|
|||
return schemaDef;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
// rely on generated class
|
||||
return this.getValueClass().getSimpleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getQualifiedName() {
|
||||
// rely on generated class
|
||||
return this.getValueClass().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final BondDataType getBondDataType() {
|
||||
return BondDataType.BT_STRUCT;
|
||||
|
|
Загрузка…
Ссылка в новой задаче