Class 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
      boolean equals​(java.lang.Object o)  
      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.Object getDefaultValue()  
      net.morimekta.providence.descriptor.PDescriptor getDescriptor()  
      java.lang.String getDocumentation()
      The type comment is the last block of comment written before the type declaration.
      net.morimekta.providence.PType getType()  
      boolean hasAnnotation​(java.lang.String name)
      Get the given annotation value.
      boolean hasDefaultValue()  
      int hashCode()  
      boolean isAutoType()  
      boolean isInnerType()  
      • 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.descriptor.PDescriptor

        getQualifiedName
    • 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:
        isInnerType in class net.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object>
      • isAutoType

        public boolean isAutoType()
        Specified by:
        isAutoType in class net.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object>
      • 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 interface CAnnotatedDescriptor
        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:
        getDefaultValue in interface net.morimekta.providence.descriptor.PDescriptor
        Overrides:
        getDefaultValue in class net.morimekta.providence.descriptor.PDeclaredDescriptor<java.lang.Object>
      • getType

        @Nonnull
        public net.morimekta.providence.PType getType()
        Specified by:
        getType in interface net.morimekta.providence.descriptor.PDescriptor
      • hasAnnotation

        public boolean hasAnnotation​(@Nonnull
                                     java.lang.String name)
        Description copied from interface: CAnnotatedDescriptor
        Get the given annotation value.
        Specified by:
        hasAnnotation in interface CAnnotatedDescriptor
        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 interface CAnnotatedDescriptor
        Parameters:
        name - Name of annotation.
        Returns:
        The annotation value or null.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object