Class JMessage<T extends net.morimekta.providence.reflect.contained.CMessage<T>>


  • public class JMessage<T extends net.morimekta.providence.reflect.contained.CMessage<T>>
    extends java.lang.Object
    • Constructor Detail

      • JMessage

        public JMessage​(net.morimekta.providence.descriptor.PMessageDescriptor<T,net.morimekta.providence.reflect.contained.CField> descriptor,
                        JHelper helper)
    • Method Detail

      • descriptor

        public net.morimekta.providence.descriptor.PMessageDescriptor<T,net.morimekta.providence.reflect.contained.CField> descriptor()
      • variant

        public net.morimekta.providence.PMessageVariant variant()
      • isException

        public boolean isException()
      • isUnion

        public boolean isUnion()
      • jsonCompactible

        public boolean jsonCompactible()
      • instanceType

        public java.lang.String instanceType()
        The short class name of the message.
        Returns:
        The class short name.
      • declaredOrderFields

        public java.util.List<JField> declaredOrderFields()
      • numericalOrderFields

        public java.util.List<JField> numericalOrderFields()
      • getDescriptorClass

        public java.lang.String getDescriptorClass()
                                            throws net.morimekta.providence.generator.GeneratorException
        Throws:
        net.morimekta.providence.generator.GeneratorException
      • getProviderClass

        public java.lang.String getProviderClass()
                                          throws net.morimekta.providence.generator.GeneratorException
        Throws:
        net.morimekta.providence.generator.GeneratorException
      • extraImplements

        public java.lang.String extraImplements()
      • exceptionBaseClass

        public java.lang.String exceptionBaseClass()
      • exceptionMessageField

        public java.util.Optional<JField> exceptionMessageField()
        If the message has a 'string' field named 'message', which can be used as the 'message' for exceptions.
        Returns:
        Optional message field.
      • getExceptionMessageFieldName

        @Nonnull
        public java.lang.String getExceptionMessageFieldName()
      • hasAnnotation

        public boolean hasAnnotation​(net.morimekta.providence.util.ThriftAnnotation annotation)
        Check if the annotation is present.
        Parameters:
        annotation - The annotation to check.
        Returns:
        True if the annotaiton is present.
      • hasAnnotation

        public boolean hasAnnotation​(java.lang.String annotation)
        Check if the annotation is present.
        Parameters:
        annotation - The annotation to check.
        Returns:
        True if the annotaiton is present.