Class CField<M extends PMessage<M>>

    • Field Detail

      • EMPTY_ARRAY

        public static final CField<?>[] EMPTY_ARRAY
    • Method Detail

      • 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.
      • getId

        public int getId()
        Specified by:
        getId in interface PField<M extends PMessage<M>>
        Returns:
        The field numeric ID or key.
      • getArgumentsType

        public PStructDescriptor<?> getArgumentsType()
        Description copied from interface: PField
        If present, is the params type to be used for parameterizable field content, e.g. with GraphQL.
        Specified by:
        getArgumentsType in interface PField<M extends PMessage<M>>
        Returns:
        The params type, or null if not parameterizable.
      • getName

        @Nonnull
        public java.lang.String getName()
        Specified by:
        getName in interface PField<M extends PMessage<M>>
        Returns:
        The field name (original).
      • getPojoName

        @Nonnull
        public java.lang.String getPojoName()
        Specified by:
        getPojoName in interface PField<M extends PMessage<M>>
        Returns:
        The field's pojo name.
      • hasDefaultValue

        public boolean hasDefaultValue()
        Specified by:
        hasDefaultValue in interface PField<M extends PMessage<M>>
        Returns:
        Whether the field has an explicit default value.
      • getDefaultValue

        public java.lang.Object getDefaultValue()
        Specified by:
        getDefaultValue in interface PField<M extends PMessage<M>>
        Returns:
        The default value or null if none. This should return value also where the field has an implicit default value, e.g. numerical types.
      • 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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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