private static class ReturnTypeFactory.AptReturnType extends AbstractMessageObjectType implements ReturnType
ReturnType.VoidReturnType| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> |
fields |
private MessageMethod |
method |
private java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> |
methods |
private javax.lang.model.type.TypeMirror |
returnType |
private ThrowableType |
throwableType |
elements, typeMirror, typesVOID| Constructor and Description |
|---|
AptReturnType(javax.lang.model.util.Elements elements,
javax.lang.model.util.Types types,
javax.lang.model.type.TypeMirror returnType,
MessageMethod method) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkType(Parameter parameter,
javax.lang.model.type.TypeMirror type) |
boolean |
equals(java.lang.Object obj) |
boolean |
hasFieldFor(Parameter parameter)
Checks to see if the return type has a field with the name with the same name and type as the
parameter. |
int |
hashCode() |
boolean |
hasMethodFor(Parameter parameter)
Checks to see if the return type has a method with the name with the same name and parameter type as the
parameter. |
private void |
init() |
boolean |
isPrimitive()
Indicates whether or not the return type is a primitive.
|
boolean |
isThrowable()
Checks to see if the return type is an exception, extends Throwable.
|
java.lang.String |
name()
Returns the qualified class name of the return type.
|
javax.lang.model.type.TypeMirror |
reference()
The object used to extract information for the message logger or message bundle, if applicable.
|
ThrowableType |
throwableReturnType()
Returns the exception return type if
ReturnType.isThrowable() returns true. |
java.lang.String |
toString() |
private java.lang.String |
unbox(Parameter parameter) |
isAssignableFrom, isSameAs, isSubtypeOf, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisAssignableFrom, isSameAs, isSubtypeOf, typeprivate final java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> fields
private final java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> methods
private final javax.lang.model.type.TypeMirror returnType
private final MessageMethod method
private ThrowableType throwableType
AptReturnType(javax.lang.model.util.Elements elements,
javax.lang.model.util.Types types,
javax.lang.model.type.TypeMirror returnType,
MessageMethod method)
public boolean hasFieldFor(Parameter parameter)
ReturnTypeparameter.hasFieldFor in interface ReturnTypeparameter - the parameter to check.true if the field exists, is accessible, mutable and is assignable from the type otherwise
false.public boolean hasMethodFor(Parameter parameter)
ReturnTypeparameter.hasMethodFor in interface ReturnTypeparameter - the parameter to check.true if the method exists, is accessible and its parameter is assignable from the type, otherwise
false.public boolean isThrowable()
ReturnTypeisThrowable in interface ReturnTypetrue if the return type is an exception, otherwise
false.public boolean isPrimitive()
ReturnTypeisPrimitive in interface ReturnTypetrue if a primitive, otherwise false.public java.lang.String name()
ReturnTypename in interface MessageObjectname in interface ReturnTypepublic ThrowableType throwableReturnType()
ReturnTypeReturnType.isThrowable() returns true. Otherwise null is
returned.throwableReturnType in interface ReturnTypenull.private void init()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic javax.lang.model.type.TypeMirror reference()
MessageObjectExecutableElement
might be returned.reference in interface MessageObjectprivate boolean checkType(Parameter parameter, javax.lang.model.type.TypeMirror type)
private java.lang.String unbox(Parameter parameter)