Class ReturnTypeFactory.AptReturnType

    • Field Detail

      • returnType

        private final javax.lang.model.type.TypeMirror returnType
      • delegate

        private final javax.lang.model.element.Element delegate
      • resolvedType

        private final javax.lang.model.type.TypeMirror resolvedType
      • isThrowable

        private final boolean isThrowable
    • Constructor Detail

      • AptReturnType

        AptReturnType​(javax.annotation.processing.ProcessingEnvironment processingEnv,
                      javax.lang.model.type.TypeMirror returnType,
                      MessageMethod method)
    • Method Detail

      • getDelegate

        public javax.lang.model.element.Element getDelegate()
        Description copied from interface: DelegatingElement
        The element to delegate the default methods to.
        Specified by:
        getDelegate in interface DelegatingElement
        Returns:
        the delegate
      • asType

        public javax.lang.model.type.TypeMirror asType()
        Specified by:
        asType in interface DelegatingElement
        Specified by:
        asType in interface javax.lang.model.element.Element
      • isThrowable

        public boolean isThrowable()
        Description copied from interface: ReturnType
        Checks to see if the return type is an exception, extends Throwable or the value of a Supplier is a Throwable type.
        Specified by:
        isThrowable in interface ReturnType
        Returns:
        true if the return type is an exception, otherwise false.
        See Also:
        ReturnType.resolvedType()
      • name

        public java.lang.String name()
        Description copied from interface: ReturnType
        Returns the qualified class name of the return type.
        Specified by:
        name in interface ReturnType
        Returns:
        the qualified class name fo the return type.
      • resolvedType

        public javax.lang.model.type.TypeMirror resolvedType()
        Description copied from interface: ReturnType
        Checks this type to see if there are any type arguments. If any type arguments are found the first type is returned and assumed to be the resolved type. Otherwise this type is returned.

        This is useful for the Supplier return type.

        Specified by:
        resolvedType in interface ReturnType
        Returns:
        the resolved return type
      • init

        private void init()
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface javax.lang.model.element.Element
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface javax.lang.model.element.Element
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object