// 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;

    public MBeanAttributeBuilder withAnnotatedGetter(Method annotatedGetter)
    {
        if (annotatedGetter == null) {
            throw new NullPointerException("annotatedGetter is null");
        }
        if (!isValidGetter(annotatedGetter)) {
            throw new IllegalArgumentException("Method is not a valid getter: " + annotatedGetter);
        }
        this.annotatedGetter = annotatedGetter;
        return this;
    }

    public MBeanAttributeBuilder withConcreteSetter(Method concreteSetter)
    {
        if (concreteSetter == null) {
            throw new NullPointerException("concreteSetter is null");
        }
        if (!isValidSetter(concreteSetter)) {
            throw new IllegalArgumentException("Method is not a valid setter: " + concreteSetter);
        }
        this.concreteSetter = concreteSetter;
        return this;
    }

    public MBeanAttributeBuilder withAnnotatedSetter(Method annotatedSetter)
    {
        if (annotatedSetter == null) {
            throw new NullPointerException("annotatedSetter 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;


    public MBeanAttributeBuilder withAnnotatedGetter(Method annotatedGetter)
    {
        if (annotatedGetter == null) {
            throw new NullPointerException("annotatedGetter is null");
        }
        if (!isValidGetter(annotatedGetter)) {
            throw new IllegalArgumentException("Method is not a valid getter: " + annotatedGetter);
        }
        this.annotatedGetter = annotatedGetter;
        return this;
    }

    public MBeanAttributeBuilder withConcreteSetter(Method concreteSetter)
    {
        if (concreteSetter == null) {
            throw new NullPointerException("concreteSetter is null");
        }
        if (!isValidSetter(concreteSetter)) {
            throw new IllegalArgumentException("Method is not a valid setter: " + concreteSetter);
        }
        this.concreteSetter = concreteSetter;
        return this;
    }

    public MBeanAttributeBuilder withAnnotatedSetter(Method annotatedSetter)
    {
        if (annotatedSetter == null) {
            throw new NullPointerException("annotatedSetter is null");
        }
        if (!isValidSetter(annotatedSetter)) {