Package org.apache.niolex.commons.reflect.FieldUtil

Examples of org.apache.niolex.commons.reflect.FieldUtil.Filter


     * @param nameRegex the field name regex expression
     * @return this
     */
    public final FieldFilter<T> nameLike(final String nameRegex) {
        final Pattern p = Pattern.compile(nameRegex);
        return this.add(new Filter(){
            @Override
            public boolean isValid(Field f) {
                return p.matcher(f.getName()).matches();
            }});
    }
View Full Code Here


     * Filter the fields with only static fields.
     *
     * @return this
     */
    public final FieldFilter<T> onlyStatic() {
        return this.add(new Filter(){
            @Override
            public boolean isValid(Field f) {
                return Modifier.isStatic(f.getModifiers());
            }});
    }
View Full Code Here

     * Filter the fields without static fields.
     *
     * @return this
     */
    public final FieldFilter<T> noStatic() {
        return this.add(new Filter(){
            @Override
            public boolean isValid(Field f) {
                return !Modifier.isStatic(f.getModifiers());
            }});
    }
View Full Code Here

     * Filter the fields without synthetic fields.
     *
     * @return this
     */
    public final FieldFilter<T> noSynthetic() {
        return this.add(new Filter(){
            @Override
            public boolean isValid(Field f) {
                // SYNTHETIC = 0x00001000;
                return (f.getModifiers() & 0x00001000) == 0;
            }});
View Full Code Here

TOP

Related Classes of org.apache.niolex.commons.reflect.FieldUtil.Filter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.