Class CUnionDescriptor

  • All Implemented Interfaces:
    java.lang.reflect.Type, net.morimekta.providence.descriptor.PDescriptor, CAnnotatedDescriptor, CMessageDescriptor

    public class CUnionDescriptor
    extends net.morimekta.providence.descriptor.PUnionDescriptor<CUnion>
    implements CMessageDescriptor
    Since:
    07.09.15
    Author:
    Stein Eldar Johnsen
    • Constructor Summary

      Constructors 
      Constructor Description
      CUnionDescriptor​(java.lang.String comment, java.lang.String packageName, java.lang.String name, java.util.List<CField<CUnion>> fields, java.util.Map<java.lang.String,​java.lang.String> annotations, net.morimekta.providence.descriptor.PDescriptorProvider implementing)  
    • Constructor Detail

      • CUnionDescriptor

        public CUnionDescriptor​(java.lang.String comment,
                                java.lang.String packageName,
                                java.lang.String name,
                                java.util.List<CField<CUnion>> fields,
                                java.util.Map<java.lang.String,​java.lang.String> annotations,
                                net.morimekta.providence.descriptor.PDescriptorProvider implementing)
    • Method Detail

      • isInnerType

        public boolean isInnerType()
        Specified by:
        isInnerType in class net.morimekta.providence.descriptor.PDeclaredDescriptor<CUnion>
      • isAutoType

        public boolean isAutoType()
        Specified by:
        isAutoType in class net.morimekta.providence.descriptor.PDeclaredDescriptor<CUnion>
      • getDocumentation

        public final java.lang.String getDocumentation()
        Description copied from interface: CAnnotatedDescriptor
        The type comment is the last block of comment written before the type declaration. Comments on the same line, after the declaration is ignored.
        Specified by:
        getDocumentation in interface CAnnotatedDescriptor
        Returns:
        The comment string containing all formatting (not including the comment delimiter and the leading space.
      • findFieldByPojoName

        public CField<CUnion> findFieldByPojoName​(java.lang.String pojoName)
        Specified by:
        findFieldByPojoName in class net.morimekta.providence.descriptor.PMessageDescriptor<CUnion>
      • isSimple

        public boolean isSimple()
        Specified by:
        isSimple in interface CMessageDescriptor
        Overrides:
        isSimple in class net.morimekta.providence.descriptor.PMessageDescriptor<CUnion>
        Returns:
        True if the message is simple. A simple message contains no containers, and no sub-messages.
      • hasAnnotation

        public boolean hasAnnotation​(@Nonnull
                                     java.lang.String name)
        Description copied from interface: CAnnotatedDescriptor
        Get the given annotation value.
        Specified by:
        hasAnnotation in interface CAnnotatedDescriptor
        Parameters:
        name - Name of annotation.
        Returns:
        If the annotation is present.
      • getAnnotationValue

        public java.lang.String getAnnotationValue​(@Nonnull
                                                   java.lang.String name)
        Description copied from interface: CAnnotatedDescriptor
        Get the given annotation value.
        Specified by:
        getAnnotationValue in interface CAnnotatedDescriptor
        Parameters:
        name - Name of annotation.
        Returns:
        The annotation value or null.
      • builder

        @Nonnull
        public CUnion.Builder builder()
        Overrides:
        builder in class net.morimekta.providence.descriptor.PMessageDescriptor<CUnion>