// Path: src/main/java/org/azeckoski/reflectutils/ClassFields.java
// public static enum FieldFindMode { 
//     /**
//      * (default) finds fields by matched public getters and setters first and then public fields
//      */
//     HYBRID, 
//     /**
//      * finds all fields which are accessible (public, protected, or private), ignores getters and setters
//      */
//     FIELD, 
//     /**
//      * find all matched getters and setters only, ignores fields
//      */
//     PROPERTY,
//     /**
//      * finds all possible fields including matched getter/setter
//      */
//     ALL
// }
// 
// Path: src/main/java/org/azeckoski/reflectutils/ClassFields.java
// public static enum FieldsFilter {
//     /**
//      * all complete (read and write) fields,
//      * getters and setters included
//      */
//     COMPLETE, 
//     /**
//      * (default)
//      * all readable fields (may not be writeable),
//      * includes transient and virtual (getter only) fields
//      */
//     READABLE, 
//     /**
//      * all writeable fields (may not be readable),
//      * public and setters
//      */
//     WRITEABLE, 
//     /**
//      * all accessible serializable fields or getters (skips transients)
//      */
//     SERIALIZABLE,
//     /**
//      * all accessible serializable fields (skips transient fields),
//      * no virtual fields (getters only)
//      */
//     SERIALIZABLE_FIELDS,
//     /**
//      * all fields including ones that are virtual (read or write only)
//      */
//     ALL
// }


import junit.framework.TestCase;
import org.azeckoski.reflectutils.ClassFields.FieldFindMode;
import org.azeckoski.reflectutils.ClassFields.FieldsFilter;
import org.azeckoski.reflectutils.annotations.*;
import org.azeckoski.reflectutils.classes.*;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.util.Set;
        assertFalse( cf.isFieldNameValid("ID", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("mystring", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("XXXXXX", FieldsFilter.ALL) );

        cf = new ClassFields(TestCompound.class);
        assertNotNull(cf);
        assertEquals(4, cf.size());
        assertTrue( cf.isFieldNameValid("myInt", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("myString", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("myField", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("fieldInt", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("myint", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("mystring", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("XXXXXX", FieldsFilter.ALL) );

        cf = new ClassFields(TestEntity.class);
        assertNotNull(cf);
        assertEquals(6, cf.size());
        assertTrue( cf.isFieldNameValid("id", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("entityId", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("extra", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("bool", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("sArray", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("entityid", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("sarray", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("XXXXXX", FieldsFilter.ALL) );

        cf = new ClassFields(TestNone.class);
        assertNotNull(cf);
        assertEquals(0, cf.size());
// Path: src/main/java/org/azeckoski/reflectutils/ClassFields.java
// public static enum FieldFindMode { 
//     /**
//      * (default) finds fields by matched public getters and setters first and then public fields
//      */
//     HYBRID, 
//     /**
//      * finds all fields which are accessible (public, protected, or private), ignores getters and setters
//      */
//     FIELD, 
//     /**
//      * find all matched getters and setters only, ignores fields
//      */
//     PROPERTY,
//     /**
//      * finds all possible fields including matched getter/setter
//      */
//     ALL
// }
// 
// Path: src/main/java/org/azeckoski/reflectutils/ClassFields.java
// public static enum FieldsFilter {
//     /**
//      * all complete (read and write) fields,
//      * getters and setters included
//      */
//     COMPLETE, 
//     /**
//      * (default)
//      * all readable fields (may not be writeable),
//      * includes transient and virtual (getter only) fields
//      */
//     READABLE, 
//     /**
//      * all writeable fields (may not be readable),
//      * public and setters
//      */
//     WRITEABLE, 
//     /**
//      * all accessible serializable fields or getters (skips transients)
//      */
//     SERIALIZABLE,
//     /**
//      * all accessible serializable fields (skips transient fields),
//      * no virtual fields (getters only)
//      */
//     SERIALIZABLE_FIELDS,
//     /**
//      * all fields including ones that are virtual (read or write only)
//      */
//     ALL
// }


// Path: src/test/java/org/azeckoski/reflectutils/ClassFieldsTest.java
import junit.framework.TestCase;
import org.azeckoski.reflectutils.ClassFields.FieldFindMode;
import org.azeckoski.reflectutils.ClassFields.FieldsFilter;
import org.azeckoski.reflectutils.annotations.*;
import org.azeckoski.reflectutils.classes.*;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.util.Set;

        assertFalse( cf.isFieldNameValid("ID", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("mystring", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("XXXXXX", FieldsFilter.ALL) );

        cf = new ClassFields(TestCompound.class);
        assertNotNull(cf);
        assertEquals(4, cf.size());
        assertTrue( cf.isFieldNameValid("myInt", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("myString", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("myField", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("fieldInt", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("myint", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("mystring", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("XXXXXX", FieldsFilter.ALL) );

        cf = new ClassFields(TestEntity.class);
        assertNotNull(cf);
        assertEquals(6, cf.size());
        assertTrue( cf.isFieldNameValid("id", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("entityId", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("extra", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("bool", FieldsFilter.ALL) );
        assertTrue( cf.isFieldNameValid("sArray", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("entityid", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("sarray", FieldsFilter.ALL) );
        assertFalse( cf.isFieldNameValid("XXXXXX", FieldsFilter.ALL) );

        cf = new ClassFields(TestNone.class);
        assertNotNull(cf);
        assertEquals(0, cf.size());
        assertFalse( cf.isFieldNameValid("XXXXXX", FieldsFilter.ALL) );