final void checkReturnType ( TypeElement autoValueClass , ExecutableElement getter ) { TypeMirror type = getter . getReturnType ( ) ; if ( type . getKind ( ) == TypeKind . ARRAY ) { TypeMirror componentType = ( ( ArrayType ) type ) . getComponentType ( ) ; if ( componentType . getKind ( ) . isPrimitive ( ) ) { warnAboutPrimitiveArrays ( autoValueClass , getter ) ; } else { errorReporter . reportError ( "An @" + simpleAnnotationName + " class cannot define an array-valued property unless it is a primitive array" , getter ) ; } } }
Checks that the return type of the given property method is allowed . Currently this means that it cannot be an array unless it is a primitive array .