/** * Reads the property descriptor information from the method. * * @param method the method to read the property descriptor. * @return the property descriptor provided by this method. * @throws NullPointerException if {@code method} is <code>null</code>. */ public PropertyDescriptor readDescriptor(final Method method) throws NullPointerException { Arg.checkNotNull("method", method); final PropertyMetaData.Builder builder = new PropertyMetaData.Builder(); final Class<?> declaringType = method.getDeclaringClass(); final PropertyKey key = readKey(method); final PropertyType type = readType(method); builder.with(new PropertyContextProxy(context)) .withDeclaringType(declaringType).with(key).with(type); addValueRange(builder, method); addExpression(builder, method); addLifecycle(builder, method); addConstraints(builder, method); addDocumentProxy(builder, method, key); addComments(builder); addSecured(builder, method); addCategories(builder, method); addUseType(builder, method); return builder.build(); }