I get:
// optional .KmObject kmobject = 1;
public static final int KMOBJECT_FIELD_NUMBER = 1;
private boolean hasKmobject;
private KmObjectProtos.KmObject kmobject_ =
KmObjectProtos.KmObject.getDefaultInstance();
public boolean hasKmobject() { return hasKmobject; }
public KmObjectProtos.KmObject getKmobject() { return kmobject_; }
On Wed, Jan 12, 2011 at 3:23 AM, Meghana <[email protected]>wrote:
> Thanks for the reply Kenton.
>
> Here's the example -
> proto files :
>
> option java_outer_classname = "KmObjectProtos";
>
> message KmObject {
> optional string id = 1;
> optional string eTag = 2;
> optional string eTagContents = 3;
> optional string cDate = 4;
> optional string uDate = 5;
> optional bool sysInternal = 6;
> }
>
>
> option java_outer_classname = "ArtifactProtos";
>
> import "KmObject.proto";
>
> message Artifact {
> optional KmObject kmobject = 1;
> optional string artifactType = 2;
> optional string contentHash = 3;
> }
>
> Generated Java -
>
> // optional .KmObject kmobject = 1;
> public static final int KMOBJECT_FIELD_NUMBER = 1;
> private boolean hasKmobject;
> private KmObject.KmObject kmobject_;
> public boolean hasKmobject() { return hasKmobject; }
> public KmObject.KmObject getKmobject() { return kmobject_; }
>
>
> I was expecting it to be KmObjectProtos.KmObject.
>
>
> On Jan 12, 2:26 am, Kenton Varda <[email protected]> wrote:
> > Can you provide a small, self-contained example?
> >
> > On Mon, Jan 10, 2011 at 7:13 AM, Meghana <[email protected]
> >wrote:
> >
> > > Hi,
> >
> > > I am using imports in my proto files. So, B has an import of A. When I
> > > generate the java code for B, all references to A are specified as A.A
> > > i.e. A(dot)A. It does not seem to be picking up the
> > > java_outer_classname from A.
> >
> > > Any idea what's going wrong?
> >
> > > Thanks.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Protocol Buffers" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<protobuf%[email protected]>
> <protobuf%[email protected]<protobuf%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/protobuf?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.