Commit 77d388c7 authored by Lubomir Bulej's avatar Lubomir Bulej

Update protobuf definition

Use ClassInfo structure to send a class name along with a classloader
tag for both the class being instrumented as well as the supertype
classes.
parent d155e382
......@@ -2168,396 +2168,19 @@ public final class Protocol {
}
}
public interface ClassLoaderDescriptorOrBuilder extends
// @@protoc_insertion_point(interface_extends:ClassLoaderDescriptor)
public interface ClassInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:ClassInfo)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
java.lang.String getName();
/**
* <code>optional string name = 1;</code>
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <code>optional int64 tag = 2;</code>
*/
long getTag();
}
/**
* Protobuf type {@code ClassLoaderDescriptor}
*/
public static final class ClassLoaderDescriptor extends
com.google.protobuf.GeneratedMessageLite<
ClassLoaderDescriptor, ClassLoaderDescriptor.Builder> implements
// @@protoc_insertion_point(message_implements:ClassLoaderDescriptor)
ClassLoaderDescriptorOrBuilder {
private ClassLoaderDescriptor() {
name_ = "";
}
public static final int NAME_FIELD_NUMBER = 1;
private java.lang.String name_;
/**
* <code>optional string name = 1;</code>
*/
public java.lang.String getName() {
return name_;
}
/**
* <code>optional string name = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(name_);
}
/**
* <code>optional string name = 1;</code>
*/
private void setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
}
/**
* <code>optional string name = 1;</code>
*/
private void clearName() {
name_ = getDefaultInstance().getName();
}
/**
* <code>optional string name = 1;</code>
*/
private void setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value.toStringUtf8();
}
public static final int TAG_FIELD_NUMBER = 2;
private long tag_;
/**
* <code>optional int64 tag = 2;</code>
*/
public long getTag() {
return tag_;
}
/**
* <code>optional int64 tag = 2;</code>
*/
private void setTag(long value) {
tag_ = value;
}
/**
* <code>optional int64 tag = 2;</code>
*/
private void clearTag() {
tag_ = 0L;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!name_.isEmpty()) {
output.writeString(1, getName());
}
if (tag_ != 0L) {
output.writeInt64(2, tag_);
}
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (!name_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(1, getName());
}
if (tag_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, tag_);
}
memoizedSerializedSize = size;
return size;
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
/**
* Protobuf type {@code ClassLoaderDescriptor}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor, Builder> implements
// @@protoc_insertion_point(builder_implements:ClassLoaderDescriptor)
ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptorOrBuilder {
// Construct using ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* <code>optional string name = 1;</code>
*/
public java.lang.String getName() {
return instance.getName();
}
/**
* <code>optional string name = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
return instance.getNameBytes();
}
/**
* <code>optional string name = 1;</code>
*/
public Builder setName(
java.lang.String value) {
copyOnWrite();
instance.setName(value);
return this;
}
/**
* <code>optional string name = 1;</code>
*/
public Builder clearName() {
copyOnWrite();
instance.clearName();
return this;
}
/**
* <code>optional string name = 1;</code>
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setNameBytes(value);
return this;
}
/**
* <code>optional int64 tag = 2;</code>
*/
public long getTag() {
return instance.getTag();
}
/**
* <code>optional int64 tag = 2;</code>
*/
public Builder setTag(long value) {
copyOnWrite();
instance.setTag(value);
return this;
}
/**
* <code>optional int64 tag = 2;</code>
*/
public Builder clearTag() {
copyOnWrite();
instance.clearTag();
return this;
}
// @@protoc_insertion_point(builder_scope:ClassLoaderDescriptor)
}
protected final Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
return null;
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor other = (ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor) arg1;
name_ = visitor.visitString(!name_.isEmpty(), name_,
!other.name_.isEmpty(), other.name_);
tag_ = visitor.visitLong(tag_ != 0L, tag_,
other.tag_ != 0L, other.tag_);
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
.INSTANCE) {
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 16: {
tag_ = input.readInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
throw new RuntimeException(
new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this));
} finally {
}
}
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
}
}
}
return PARSER;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:ClassLoaderDescriptor)
private static final ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ClassLoaderDescriptor();
DEFAULT_INSTANCE.makeImmutable();
}
public static ch.usi.dag.dislserver.Protocol.ClassLoaderDescriptor getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<ClassLoaderDescriptor> PARSER;
public static com.google.protobuf.Parser<ClassLoaderDescriptor> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface SuperTypeDescriptorOrBuilder extends
// @@protoc_insertion_point(interface_extends:SuperTypeDescriptor)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <code>optional string name = 1;</code>
*/
java.lang.String getName();
java.lang.String getClassName();
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
com.google.protobuf.ByteString
getNameBytes();
getClassNameBytes();
/**
* <code>optional int64 classLoaderTag = 2;</code>
......@@ -2565,60 +2188,60 @@ public final class Protocol {
long getClassLoaderTag();
}
/**
* Protobuf type {@code SuperTypeDescriptor}
* Protobuf type {@code ClassInfo}
*/
public static final class SuperTypeDescriptor extends
public static final class ClassInfo extends
com.google.protobuf.GeneratedMessageLite<
SuperTypeDescriptor, SuperTypeDescriptor.Builder> implements
// @@protoc_insertion_point(message_implements:SuperTypeDescriptor)
SuperTypeDescriptorOrBuilder {
private SuperTypeDescriptor() {
name_ = "";
ClassInfo, ClassInfo.Builder> implements
// @@protoc_insertion_point(message_implements:ClassInfo)
ClassInfoOrBuilder {
private ClassInfo() {
className_ = "";
}
public static final int NAME_FIELD_NUMBER = 1;
private java.lang.String name_;
public static final int CLASSNAME_FIELD_NUMBER = 1;
private java.lang.String className_;
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
public java.lang.String getName() {
return name_;
public java.lang.String getClassName() {
return className_;
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(name_);
getClassNameBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(className_);
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
private void setName(
private void setClassName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
className_ = value;
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
private void clearName() {
private void clearClassName() {
name_ = getDefaultInstance().getName();
className_ = getDefaultInstance().getClassName();
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
private void setNameBytes(
private void setClassNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value.toStringUtf8();
className_ = value.toStringUtf8();
}
public static final int CLASSLOADERTAG_FIELD_NUMBER = 2;
......@@ -2646,8 +2269,8 @@ public final class Protocol {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!name_.isEmpty()) {
output.writeString(1, getName());
if (!className_.isEmpty()) {
output.writeString(1, getClassName());
}
if (classLoaderTag_ != 0L) {
output.writeInt64(2, classLoaderTag_);
......@@ -2659,9 +2282,9 @@ public final class Protocol {
if (size != -1) return size;
size = 0;
if (!name_.isEmpty()) {
if (!className_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(1, getName());
.computeStringSize(1, getClassName());
}
if (classLoaderTag_ != 0L) {
size += com.google.protobuf.CodedOutputStream
......@@ -2671,60 +2294,60 @@ public final class Protocol {
return size;
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(byte[] data)
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(java.io.InputStream input)
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseDelimitedFrom(java.io.InputStream input)
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseDelimitedFrom(
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor parseFrom(
public static ch.usi.dag.dislserver.Protocol.ClassInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
......@@ -2735,61 +2358,61 @@ public final class Protocol {
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor prototype) {
public static Builder newBuilder(ch.usi.dag.dislserver.Protocol.ClassInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
/**
* Protobuf type {@code SuperTypeDescriptor}
* Protobuf type {@code ClassInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor, Builder> implements
// @@protoc_insertion_point(builder_implements:SuperTypeDescriptor)
ch.usi.dag.dislserver.Protocol.SuperTypeDescriptorOrBuilder {
// Construct using ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor.newBuilder()
ch.usi.dag.dislserver.Protocol.ClassInfo, Builder> implements
// @@protoc_insertion_point(builder_implements:ClassInfo)
ch.usi.dag.dislserver.Protocol.ClassInfoOrBuilder {
// Construct using ch.usi.dag.dislserver.Protocol.ClassInfo.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
public java.lang.String getName() {
return instance.getName();
public java.lang.String getClassName() {
return instance.getClassName();
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
return instance.getNameBytes();
getClassNameBytes() {
return instance.getClassNameBytes();
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
public Builder setName(
public Builder setClassName(
java.lang.String value) {
copyOnWrite();
instance.setName(value);
instance.setClassName(value);
return this;
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
public Builder clearName() {
public Builder clearClassName() {
copyOnWrite();
instance.clearName();
instance.clearClassName();
return this;
}
/**
* <code>optional string name = 1;</code>
* <code>optional string className = 1;</code>
*/
public Builder setNameBytes(
public Builder setClassNameBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setNameBytes(value);
instance.setClassNameBytes(value);
return this;
}
......@@ -2816,14 +2439,14 @@ public final class Protocol {
return this;
}
// @@protoc_insertion_point(builder_scope:SuperTypeDescriptor)
// @@protoc_insertion_point(builder_scope:ClassInfo)
}
protected final Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor();
return new ch.usi.dag.dislserver.Protocol.ClassInfo();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
......@@ -2836,9 +2459,9 @@ public final class Protocol {
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor other = (ch.usi.dag.dislserver.Protocol.SuperTypeDescriptor) arg1;
name_ = visitor.visitString(!name_.isEmpty(), name_,
!other.name_.isEmpty(), other.name_);
ch.usi.dag.dislserver.Protocol.ClassInfo other = (ch.usi.dag.dislserver.Protocol.ClassInfo) arg1;
className_ = visitor.visitString(!className_.isEmpty(), className_,