// Path: src/main/java/org/weakref/jmx/ReflectionUtils.java
// public static boolean isValidGetter(Method getter)
// {
//     if (getter == null) {
//         throw new NullPointerException("getter is null");
//     }
//     if (getter.getParameterTypes().length != 0) {
//         return false;
//     }
//     if (getter.getReturnType().equals(Void.TYPE)) {
//         return false;
//     }
//     return true;
// }
// 
// Path: src/main/java/org/weakref/jmx/ReflectionUtils.java
// public static boolean isValidSetter(Method setter)
// {
//     if (setter == null) {
//         throw new NullPointerException("setter is null");
//     }
//     if (setter.getParameterTypes().length != 1) {
//         return false;
//     }
//     return true;
// }


import javax.management.Descriptor;
import javax.management.ImmutableDescriptor;
import javax.management.MBeanAttributeInfo;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.weakref.jmx.ReflectionUtils.isValidGetter;
import static org.weakref.jmx.ReflectionUtils.isValidSetter;
    private Method concreteGetter;
    private Method annotatedGetter;
    private Method concreteSetter;
    private Method annotatedSetter;
    private boolean flatten;
    private boolean nested;

    public MBeanAttributeBuilder onInstance(Object target)
    {
        if (target == null) {
            throw new NullPointerException("target is null");
        }
        this.target = target;
        return this;
    }

    public MBeanAttributeBuilder named(String name)
    {
        if (name == null) {
            throw new NullPointerException("name is null");
        }
        this.name = name;
        return this;
    }

    public MBeanAttributeBuilder withConcreteGetter(Method concreteGetter)
    {
        if (concreteGetter == null) {
            throw new NullPointerException("concreteGetter is null");
        }
// Path: src/main/java/org/weakref/jmx/ReflectionUtils.java
// public static boolean isValidGetter(Method getter)
// {
//     if (getter == null) {
//         throw new NullPointerException("getter is null");
//     }
//     if (getter.getParameterTypes().length != 0) {
//         return false;
//     }
//     if (getter.getReturnType().equals(Void.TYPE)) {
//         return false;
//     }
//     return true;
// }
// 
// Path: src/main/java/org/weakref/jmx/ReflectionUtils.java
// public static boolean isValidSetter(Method setter)
// {
//     if (setter == null) {
//         throw new NullPointerException("setter is null");
//     }
//     if (setter.getParameterTypes().length != 1) {
//         return false;
//     }
//     return true;
// }


// Path: src/main/java/org/weakref/jmx/MBeanAttributeBuilder.java
import javax.management.Descriptor;
import javax.management.ImmutableDescriptor;
import javax.management.MBeanAttributeInfo;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.weakref.jmx.ReflectionUtils.isValidGetter;
import static org.weakref.jmx.ReflectionUtils.isValidSetter;

    private Method concreteGetter;
    private Method annotatedGetter;
    private Method concreteSetter;
    private Method annotatedSetter;
    private boolean flatten;
    private boolean nested;

    public MBeanAttributeBuilder onInstance(Object target)
    {
        if (target == null) {
            throw new NullPointerException("target is null");
        }
        this.target = target;
        return this;
    }

    public MBeanAttributeBuilder named(String name)
    {
        if (name == null) {
            throw new NullPointerException("name is null");
        }
        this.name = name;
        return this;
    }

    public MBeanAttributeBuilder withConcreteGetter(Method concreteGetter)
    {
        if (concreteGetter == null) {
            throw new NullPointerException("concreteGetter is null");
        }
        if (!isValidGetter(concreteGetter)) {