Class CServiceMethod
- java.lang.Object
-
- net.morimekta.providence.reflect.contained.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 Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Set<java.lang.String>getAnnotations()Get set of available annotations.java.lang.StringgetAnnotationValue(java.lang.String name)Get the given annotation value.java.lang.StringgetDocumentation()The type comment is the last block of comment written before the type declaration.java.lang.StringgetName()CStructDescriptorgetRequestType()CUnionDescriptorgetResponseType()booleanhasAnnotation(java.lang.String name)Get the given annotation value.inthashCode()booleanisOneway()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.reflect.contained.CAnnotatedDescriptor
getAnnotationValue, hasAnnotation
-
-
-
-
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:
getNamein interfacenet.morimekta.providence.descriptor.PServiceMethod
-
isOneway
public boolean isOneway()
- Specified by:
isOnewayin interfacenet.morimekta.providence.descriptor.PServiceMethod
-
getRequestType
@Nonnull public CStructDescriptor getRequestType()
- Specified by:
getRequestTypein interfacenet.morimekta.providence.descriptor.PServiceMethod
-
getResponseType
public CUnionDescriptor getResponseType()
- Specified by:
getResponseTypein interfacenet.morimekta.providence.descriptor.PServiceMethod
-
getAnnotations
@Nonnull public java.util.Set<java.lang.String> getAnnotations()
Description copied from interface:CAnnotatedDescriptorGet set of available annotations.- Specified by:
getAnnotationsin interfaceCAnnotatedDescriptor- Returns:
- The annotation set.
-
hasAnnotation
public boolean hasAnnotation(@Nonnull java.lang.String name)Description copied from interface:CAnnotatedDescriptorGet the given annotation value.- Specified by:
hasAnnotationin interfaceCAnnotatedDescriptor- 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:CAnnotatedDescriptorGet the given annotation value.- Specified by:
getAnnotationValuein interfaceCAnnotatedDescriptor- Parameters:
name- Name of annotation.- Returns:
- The annotation value or null.
-
getDocumentation
public java.lang.String getDocumentation()
Description copied from interface:CAnnotatedDescriptorThe 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:
getDocumentationin interfaceCAnnotatedDescriptor- Returns:
- The comment string containing all formatting (not including the comment delimiter and the leading space.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-