Class CService
- java.lang.Object
-
- net.morimekta.providence.descriptor.PDeclaredDescriptor
-
- net.morimekta.providence.descriptor.PService
-
- net.morimekta.providence.reflect.contained.CService
-
- All Implemented Interfaces:
java.lang.reflect.Type
,PDescriptor
,CAnnotatedDescriptor
public class CService extends 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, 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.String
getAnnotationValue(java.lang.String name)
Get the given annotation value.java.lang.String
getDocumentation()
The type comment is the last block of comment written before the type declaration.CService
getExtendsService()
Get the service that this service extends.CServiceMethod
getMethod(java.lang.String name)
Get the method definition for the given method name.java.util.Collection<CServiceMethod>
getMethods()
Get the collection of methods for the service, including all inherited services.java.util.Collection<CServiceMethod>
getMethodsIncludingExtended()
Get all methods including methods declared in extended services.boolean
hasAnnotation(java.lang.String name)
Get the given annotation value.-
Methods inherited from class net.morimekta.providence.descriptor.PService
getDefaultValue, getType, isAutoType, isInnerType
-
Methods inherited from class net.morimekta.providence.descriptor.PDeclaredDescriptor
getName, getProgramName, getQualifiedName, getTypeName, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.reflect.contained.CAnnotatedDescriptor
getAnnotationValue, hasAnnotation
-
Methods inherited from interface net.morimekta.providence.descriptor.PDescriptor
getQualifiedName
-
-
-
-
Constructor Detail
-
CService
public CService(java.lang.String documentation, java.lang.String programName, java.lang.String name, 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()
Description copied from class:PService
Get the collection of methods for the service, including all inherited services.- Overrides:
getMethods
in classPService
- Returns:
- The collection of methods.
-
getMethod
public CServiceMethod getMethod(java.lang.String name)
Description copied from class:PService
Get the method definition for the given method name.
-
getExtendsService
public CService getExtendsService()
Description copied from class:PService
Get the service that this service extends.- Overrides:
getExtendsService
in classPService
- Returns:
- Extended service or null if none.
-
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:CAnnotatedDescriptor
Get set of available annotations.- Specified by:
getAnnotations
in interfaceCAnnotatedDescriptor
- Returns:
- The annotation set.
-
hasAnnotation
public boolean hasAnnotation(@Nonnull java.lang.String name)
Description copied from interface:CAnnotatedDescriptor
Get the given annotation value.- Specified by:
hasAnnotation
in 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:CAnnotatedDescriptor
Get the given annotation value.- Specified by:
getAnnotationValue
in interfaceCAnnotatedDescriptor
- 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 interfaceCAnnotatedDescriptor
- Returns:
- The comment string containing all formatting (not including the comment delimiter and the leading space.
-
-