Class CExceptionDescriptor
- java.lang.Object
-
- net.morimekta.providence.descriptor.PDeclaredDescriptor<T>
-
- net.morimekta.providence.descriptor.PMessageDescriptor<Exception,Field>
-
- net.morimekta.providence.descriptor.PExceptionDescriptor<CException,CField>
-
- net.morimekta.providence.reflect.contained.CExceptionDescriptor
-
- All Implemented Interfaces:
net.morimekta.providence.descriptor.PDescriptor
,CAnnotatedDescriptor
,CMessageDescriptor
public class CExceptionDescriptor extends net.morimekta.providence.descriptor.PExceptionDescriptor<CException,CField> implements CMessageDescriptor
- Since:
- 07.09.15
- Author:
- Stein Eldar Johnsen
-
-
Constructor Summary
Constructors Constructor Description CExceptionDescriptor(java.lang.String comment, java.lang.String packageName, java.lang.String name, java.util.List<CField> fields, java.util.Map<java.lang.String,java.lang.String> annotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CField
findFieldById(int id)
CField
findFieldByName(java.lang.String name)
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.CField[]
getFields()
boolean
hasAnnotation(java.lang.String name)
Get the given annotation value.boolean
isSimple()
-
Methods inherited from interface net.morimekta.providence.reflect.contained.CAnnotatedDescriptor
getAnnotationValue, hasAnnotation
-
Methods inherited from interface net.morimekta.providence.reflect.contained.CMessageDescriptor
fieldForId, fieldForName, getVariant
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class net.morimekta.providence.descriptor.PDeclaredDescriptor
getDefaultValue, getName, getProgramName, getQualifiedName, toString
-
-
-
-
Constructor Detail
-
CExceptionDescriptor
public CExceptionDescriptor(java.lang.String comment, java.lang.String packageName, java.lang.String name, java.util.List<CField> fields, java.util.Map<java.lang.String,java.lang.String> annotations)
-
-
Method Detail
-
getDocumentation
public final 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.
-
getFields
@Nonnull public CField[] getFields()
- Specified by:
getFields
in interfaceCMessageDescriptor
- Specified by:
getFields
in classnet.morimekta.providence.descriptor.PMessageDescriptor<CException,CField>
-
findFieldByName
public CField findFieldByName(java.lang.String name)
- Specified by:
findFieldByName
in interfaceCMessageDescriptor
- Specified by:
findFieldByName
in classnet.morimekta.providence.descriptor.PMessageDescriptor<CException,CField>
-
findFieldById
public CField findFieldById(int id)
- Specified by:
findFieldById
in interfaceCMessageDescriptor
- Specified by:
findFieldById
in classnet.morimekta.providence.descriptor.PMessageDescriptor<CException,CField>
-
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.
-
isSimple
public boolean isSimple()
- Specified by:
isSimple
in interfaceCMessageDescriptor
- Overrides:
isSimple
in classnet.morimekta.providence.descriptor.PMessageDescriptor<CException,CField>
- Returns:
- True if the message is simple. A simple message contains no containers, and no sub-messages.
-
-