Class ProtoTypeMetadata

java.lang.Object
org.infinispan.protostream.annotations.impl.ProtoTypeMetadata
All Implemented Interfaces:
HasProtoSchema
Direct Known Subclasses:
ImportedProtoTypeMetadata, ProtoEnumTypeMetadata, ProtoMessageTypeMetadata

public abstract class ProtoTypeMetadata extends Object implements HasProtoSchema
Since:
3.0
Author:
[email protected]
  • Field Details

  • Constructor Details

    • ProtoTypeMetadata

      protected ProtoTypeMetadata(String name, XClass javaClass)
  • Method Details

    • validateName

      protected void validateName()
    • getName

      public String getName()
    • getFullName

      public String getFullName()
    • getDocumentation

      public String getDocumentation()
    • getProtoDocs

      public String getProtoDocs()
    • getProtoTypeId

      public Integer getProtoTypeId()
    • getJavaClass

      public XClass getJavaClass()
    • getJavaClassName

      public String getJavaClassName()
    • getAnnotatedClass

      public XClass getAnnotatedClass()
      At this level we pretend the Java class and the annotated class are one and the same, but subclasses may decide otherwise.
    • getAnnotatedClassName

      public String getAnnotatedClassName()
    • isAdapter

      public boolean isAdapter()
    • isImported

      public boolean isImported()
      Indicates if this type comes from the currently processed/generated schema of from an external schema.
    • getFileName

      public String getFileName()
      The schema file where this type comes from. Must be non-null for all imported types, can be null for others.
    • isEnum

      public abstract boolean isEnum()
    • getEnumMemberByName

      public abstract ProtoEnumValueMetadata getEnumMemberByName(String name)
      This is only for enums.
    • getOuterType

      public final ProtoMessageTypeMetadata getOuterType()
    • setOuterType

      protected final void setOuterType(ProtoMessageTypeMetadata outerType)
    • generateProto

      public void generateProto(IndentWriter iw)
      Specified by:
      generateProto in interface HasProtoSchema
    • scanMemberAnnotations

      public void scanMemberAnnotations()
    • appendDocumentation

      protected static void appendDocumentation(IndentWriter iw, String documentation)