Class CServiceMethod

  • All Implemented Interfaces:
    net.morimekta.providence.descriptor.PServiceMethod, CAnnotatedDescriptor

    public class CServiceMethod
    extends java.lang.Object
    implements net.morimekta.providence.descriptor.PServiceMethod, CAnnotatedDescriptor
    Descriptor for a single service method.
    • Constructor Detail

      • CServiceMethod

        public CServiceMethod​(java.lang.String comment,
                              java.lang.String name,
                              boolean oneway,
                              CStructDescriptor requestType,
                              CUnionDescriptor responseType,
                              java.util.Map<java.lang.String,java.lang.String> annotations)
    • Method Detail

      • getName

        @Nonnull
        public java.lang.String getName()
        Specified by:
        getName in interface net.morimekta.providence.descriptor.PServiceMethod
      • isOneway

        public boolean isOneway()
        Specified by:
        isOneway in interface net.morimekta.providence.descriptor.PServiceMethod
      • getRequestType

        @Nonnull
        public CStructDescriptor getRequestType()
        Specified by:
        getRequestType in interface net.morimekta.providence.descriptor.PServiceMethod
      • getResponseType

        public CUnionDescriptor getResponseType()
        Specified by:
        getResponseType in interface net.morimekta.providence.descriptor.PServiceMethod
      • 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.
      • getDocumentation

        public 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object