private ComponentDef(Class<? extends Component> clazz) {
            for (Method method : clazz.getDeclaredMethods()) {
                String methodName = method.getName();
                if (methodName.startsWith("get")) {
                    addGetMethod(method, getFieldName(methodName, 3));
                } else if (methodName.startsWith("is")) {
                    addGetMethod(method, getFieldName(methodName, 2));
                } else if (methodName.startsWith("set")) {
                    String fieldName = getFieldName(methodName, 3);
                    addFieldType(fieldName, method.getParameterTypes()[0]);
                    handlerMap.put(methodName, new SetMethodHandler(fieldName));
                } else {
                    throw new IllegalStateException("Invalid component definition, component uses unrecognized method name: " + methodName);
                }
            }
        }