Class CConst
- java.lang.Object
-
- net.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object>
-
- net.morimekta.providence.reflect.contained.CConst
-
- All Implemented Interfaces:
java.lang.reflect.Type,net.morimekta.providence.descriptor.PDescriptor,CAnnotatedDescriptor
public class CConst extends net.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object> implements CAnnotatedDescriptor
First stage before we have a totally separate CConst from the CField contained type class.
-
-
Constructor Summary
Constructors Constructor Description CConst(java.lang.String docs, java.lang.String programName, java.lang.String name, net.morimekta.providence.descriptor.PDescriptorProvider typeProvider, net.morimekta.providence.descriptor.PValueProvider<?> valueProvider, 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.ObjectgetDefaultValue()net.morimekta.providence.descriptor.PDescriptorgetDescriptor()java.lang.StringgetDocumentation()The type comment is the last block of comment written before the type declaration.net.morimekta.providence.PTypegetType()booleanhasAnnotation(java.lang.String name)Get the given annotation value.booleanhasDefaultValue()inthashCode()booleanisAutoType()booleanisInnerType()-
Methods inherited from class net.morimekta.providence.descriptor.PDeclaredDescriptor
getName, getProgramName, getQualifiedName, getTypeName, toString
-
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
-
CConst
public CConst(@Nullable java.lang.String docs, @Nonnull java.lang.String programName, @Nonnull java.lang.String name, @Nonnull net.morimekta.providence.descriptor.PDescriptorProvider typeProvider, @Nonnull net.morimekta.providence.descriptor.PValueProvider<?> valueProvider, @Nullable java.util.Map<java.lang.String,java.lang.String> annotations)
-
-
Method Detail
-
isInnerType
public boolean isInnerType()
- Specified by:
isInnerTypein classnet.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object>
-
isAutoType
public boolean isAutoType()
- Specified by:
isAutoTypein classnet.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object>
-
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.
-
getDescriptor
@Nonnull public net.morimekta.providence.descriptor.PDescriptor getDescriptor()
-
hasDefaultValue
public boolean hasDefaultValue()
-
getDefaultValue
public java.lang.Object getDefaultValue()
- Specified by:
getDefaultValuein interfacenet.morimekta.providence.descriptor.PDescriptor- Overrides:
getDefaultValuein classnet.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object>
-
getType
@Nonnull public net.morimekta.providence.PType getType()
- Specified by:
getTypein interfacenet.morimekta.providence.descriptor.PDescriptor
-
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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-