Class CConst

    • Constructor Detail

      • CConst

        public CConst​(@Nullable
                      java.lang.String docs,
                      @Nonnull
                      java.lang.String programName,
                      @Nonnull
                      java.lang.String name,
                      @Nonnull
                      PDescriptorProvider typeProvider,
                      @Nonnull
                      PValueProvider<?> valueProvider,
                      @Nullable
                      java.util.Map<java.lang.String,​java.lang.String> annotations)
    • Method Detail

      • isInnerType

        public boolean isInnerType()
        Specified by:
        isInnerType in class PDeclaredDescriptor<java.lang.Object>
        Returns:
        Returns true if the type is an inner type. Meaning it is contained within another type or service.
      • isAutoType

        public boolean isAutoType()
        Specified by:
        isAutoType in class PDeclaredDescriptor<java.lang.Object>
        Returns:
        Returns true if the type is generated automatically by means of something else, e.g. request and response types for services. Or is a built in type as part of providence itself.
      • 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 PDescriptor getDescriptor()
      • hasDefaultValue

        public boolean hasDefaultValue()
      • getDefaultValue

        public java.lang.Object getDefaultValue()
        Specified by:
        getDefaultValue in interface PDescriptor
        Overrides:
        getDefaultValue in class PDeclaredDescriptor<java.lang.Object>
        Returns:
        The default value for the type used for default and required fields. Note that some primitive types don't support null values, and will have methods returning a default value regardless of the field required value setting.
      • getType

        @Nonnull
        public PType getType()
        Specified by:
        getType in interface PDescriptor
        Returns:
        Get the field type.
      • 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