Object (Object proxy, Method method, Object[] args) { assert method.getParameterCount() == 0: Arrays.toString(method.getParameterTypes()); String member = method.getName(); if (member.equals("toString")) { return toStringImpl(); } if (member.equals("annotationType")) { return myType; } // Handle annotation member accessors Pair<Object, String> pair = attributeValueOrError(myAnnotation, myType, member); Object value = pair.first; if (value == null) { String error = pair.second; String message = member + ". (Unable to find attribute in '" + myAnnotation.getText() + "': " + error + ")"; throw new IncompleteAnnotationException(myType, message); } return value; }