Class FieldDescriptor

java.lang.Object
org.infinispan.protostream.impl.AnnotatedDescriptorImpl
org.infinispan.protostream.descriptors.FieldDescriptor
All Implemented Interfaces:
AnnotatedDescriptor

public final class FieldDescriptor extends AnnotatedDescriptorImpl implements AnnotatedDescriptor
Represents a field in a proto file.
Since:
2.0
Author:
gustavonalle, [email protected]
  • Method Details

    • getNumber

      public int getNumber()
    • getWireTag

      public int getWireTag()
    • getType

      public Type getType()
    • getMessageType

      public Descriptor getMessageType()
    • getLabel

      public Label getLabel()
    • getOptionByName

      public Object getOptionByName(String name)
    • getOptions

      public List<Option> getOptions()
    • getOption

      public Option getOption(String name)
    • isRequired

      public boolean isRequired()
    • isRepeated

      public boolean isRepeated()
    • isPacked

      public boolean isPacked()
    • getDefaultValue

      public Object getDefaultValue()
    • isExtension

      public boolean isExtension()
    • hasDefaultValue

      public boolean hasDefaultValue()
    • getJavaType

      public JavaType getJavaType()
    • getEnumType

      public EnumDescriptor getEnumType()
    • getTypeName

      public String getTypeName()
    • getFileDescriptor

      public FileDescriptor getFileDescriptor()
      Description copied from interface: AnnotatedDescriptor
      Return the containing files's descriptor
      Specified by:
      getFileDescriptor in interface AnnotatedDescriptor
      Returns:
      the containing files's descriptor (never null)
    • getContainingMessage

      public Descriptor getContainingMessage()
    • getAnnotationConfig

      protected AnnotationConfiguration getAnnotationConfig(String annotationName)
      Description copied from class: AnnotatedDescriptorImpl
      Subclasses are responsible for fetching the AnnotationConfiguration from the appropriate config (it it exists) and to validate that the target is suitable.
      Specified by:
      getAnnotationConfig in class AnnotatedDescriptorImpl
      Returns:
      null if the annotation is not found
    • toString

      public String toString()
      Overrides:
      toString in class Object