public void validate(List<String> errors) { String createMessage = getOption(getOptions(), "java_create_message", null); if( "true".equals(createMessage) ) { for (EnumFieldDescriptor field : getFields().values()) { String type = constantToUCamelCase(field.getName()); TypeDescriptor typeDescriptor=null; // Find the type def for that guy.. if( parent!=null ) { typeDescriptor = parent.getType(type); } if( typeDescriptor == null ) { typeDescriptor = protoDescriptor.getType(type); } if( typeDescriptor == null ) { errors.add("ENUM constant '"+field.getName()+"' did not find expected associated message: "+type); } else { field.associate(typeDescriptor); typeDescriptor.associate(field); } } } }
public void validate(List<String> errors) { String createMessage = getOption(getOptions(), "java_create_message", null); if( "true".equals(createMessage) ) { for (EnumFieldDescriptor field : getFields().values()) { String type = constantToUCamelCase(field.getName()); TypeDescriptor typeDescriptor=null; // Find the type def for that guy.. if( parent!=null ) { typeDescriptor = parent.getType(type); } if( typeDescriptor == null ) { typeDescriptor = protoDescriptor.getType(type); } if( typeDescriptor == null ) { errors.add("ENUM constant '"+field.getName()+"' did not find expected associated message: "+type); } else { field.associate(typeDescriptor); typeDescriptor.associate(field); } } } }
public void validate(List<String> errors) { String createMessage = getOption(getOptions(), "java_create_message", null); if( "true".equals(createMessage) ) { for (EnumFieldDescriptor field : getFields().values()) { String type = constantToUCamelCase(field.getName()); TypeDescriptor typeDescriptor=null; // Find the type def for that guy.. if( parent!=null ) { typeDescriptor = parent.getType(type); } if( typeDescriptor == null ) { typeDescriptor = protoDescriptor.getType(type); } if( typeDescriptor == null ) { errors.add("ENUM constant '"+field.getName()+"' did not find expected associated message: "+type); } else { field.associate(typeDescriptor); typeDescriptor.associate(field); } } } }