use of org.infinispan.protostream.descriptors.EnumDescriptor in project kogito-runtimes by kiegroup.
the class AbstractMarshallerGenerator method javaTypeForMessage.
protected String javaTypeForMessage(FileDescriptor d, String messageName, SerializationContext serializationContext) {
Map<String, FileDescriptor> descriptors = serializationContext.getFileDescriptors();
for (Entry<String, FileDescriptor> entry : descriptors.entrySet()) {
List<Descriptor> messages = entry.getValue().getMessageTypes();
for (Descriptor msg : messages) {
if (messageName.equals(msg.getName())) {
return packageFromOption(d, msg) + "." + messageName;
} else if (messageName.equals(msg.getFullName())) {
return packageFromOption(d, msg) + "." + msg.getName();
}
}
List<EnumDescriptor> enums = entry.getValue().getEnumTypes();
for (EnumDescriptor msg : enums) {
if (messageName.equals(msg.getName())) {
return packageFromOption(d, msg) + "." + messageName;
} else if (messageName.equals(msg.getFullName())) {
return packageFromOption(d, msg) + "." + msg.getName();
}
}
}
return null;
}
Aggregations