Class CService
- java.lang.Object
-
- net.morimekta.providence.descriptor.PService
-
- net.morimekta.providence.reflect.contained.CService
-
- All Implemented Interfaces:
CAnnotatedDescriptor
public class CService extends net.morimekta.providence.descriptor.PService implements CAnnotatedDescriptor
Descriptor for a complete service.
-
-
Constructor Summary
Constructors Constructor Description CService(java.lang.String documentation, java.lang.String programName, java.lang.String name, net.morimekta.providence.descriptor.PServiceProvider extendsService, java.util.Collection<CServiceMethod> methods, java.util.Map<java.lang.String,java.lang.String> annotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.CServicegetExtendsService()CServiceMethodgetMethod(java.lang.String name)java.util.Collection<CServiceMethod>getMethods()java.util.Collection<CServiceMethod>getMethodsIncludingExtended()Get all methods including methods declared in extended services.booleanhasAnnotation(java.lang.String name)Get the given annotation value.-
Methods inherited from interface net.morimekta.providence.reflect.contained.CAnnotatedDescriptor
getAnnotationValue, hasAnnotation
-
-
-
-
Constructor Detail
-
CService
public CService(java.lang.String documentation, java.lang.String programName, java.lang.String name, net.morimekta.providence.descriptor.PServiceProvider extendsService, java.util.Collection<CServiceMethod> methods, java.util.Map<java.lang.String,java.lang.String> annotations)
-
-
Method Detail
-
getMethods
@Nonnull public java.util.Collection<CServiceMethod> getMethods()
- Overrides:
getMethodsin classnet.morimekta.providence.descriptor.PService
-
getMethod
public CServiceMethod getMethod(java.lang.String name)
- Specified by:
getMethodin classnet.morimekta.providence.descriptor.PService
-
getExtendsService
public CService getExtendsService()
- Overrides:
getExtendsServicein classnet.morimekta.providence.descriptor.PService
-
getMethodsIncludingExtended
public java.util.Collection<CServiceMethod> getMethodsIncludingExtended()
Get all methods including methods declared in extended services.- Returns:
- The list of service methods.
-
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.
-
-