/** * @see org.dihedron.core.filters.Filter#matches(java.lang.Object) */ @Override public boolean matches(T object) { boolean matched = true; for(Filter<T> filter : getSubFilters()) { matched = matched && filter.matches(object); if(!matched) { return false; } } return true; } }
/** * Returns the filtered set of class (static) fields of the given class, * including those inherited from the super-classes. * * @param clazz * the class whose fields are being retrieved. * @param filter * an optional filter; to get all fields pass in a {@code null} value. * @return * the set of fields from the given class and its super-classes. */ public static Set<Field> getClassFields(Class<?> clazz, Filter<Field> filter) { return getFields(clazz, new And<Field>( filter != null ? filter : new True<Field>(), new IsStatic<Field>(), new Not<Field>( new IsOverridden<Field>() ) ) ); }
/** * Returns the filtered set of class (static) fields of the given class, * including those inherited from the super-classes. * * @param clazz * the class whose fields are being retrieved. * @param filter * an optional filter; to get all fields pass in a {@code null} value. * @return * the set of fields from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Field> getClassFields(Class<?> clazz, Filter<Field> filter) { return getFields(clazz, new And<Field>( filter != null ? filter : new True<Field>(), new IsStatic<Field>(), new Not<Field>( new IsOverridden<Field>() ) ) ); }
/** * Returns the filtered set of class (static) methods of the given class, * including those inherited from the super-classes. * * @param clazz * the class whose methods are being retrieved. * @param filter * an optional filter; to get all methods pass in a {@code null} value. * @return * the filtered set of methods from the given class and its super-classes. */ public static Set<Method> getClassMethods(Class<?> clazz, Filter<Method> filter) { return getMethods(clazz, new And<Method>( filter != null ? filter : new True<Method>(), new IsStatic<Method>(), new Not<Method>( new IsOverridden<Method>() ) ) ); }
/** * @see org.dihedron.core.filters.Filter#matches(java.lang.Object) */ @Override public boolean matches(T object) { boolean matched = true; for(Filter<T> filter : getSubFilters()) { matched = matched && filter.matches(object); if(!matched) { return false; } } return true; } }
/** * Returns the filtered set of class (static) fields of the given class, * including those inherited from the super-classes. * * @param clazz * the class whose fields are being retrieved. * @param filter * an optional filter; to get all fields pass in a {@code null} value. * @return * the set of fields from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Field> getClassFields(Class<?> clazz, Filter<Field> filter) { return getFields(clazz, new And<Field>( filter != null ? filter : new True<Field>(), new IsStatic<Field>(), new Not<Field>( new IsOverridden<Field>() ) ) ); }
/** * @see org.dihedron.core.filters.Filter#matches(java.lang.Object) */ @Override public boolean matches(T object) { boolean matched = true; for(Filter<T> filter : getSubFilters()) { matched = matched && filter.matches(object); if(!matched) { return false; } } return true; } }
/** * Returns the filtered set of class (static) methods of the given class, * including those inherited from the super-classes. * * @param clazz * the class whose methods are being retrieved. * @param filter * an optional filter; to get all methods pass in a {@code null} value. * @return * the filtered set of methods from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Method> getClassMethods(Class<?> clazz, Filter<Method> filter) { return getMethods(clazz, new And<Method>( filter != null ? filter : new True<Method>(), new IsStatic<Method>(), new Not<Method>( new IsOverridden<Method>() ) ) ); }
/** * Returns the filtered set of class (static) methods of the given class, * including those inherited from the super-classes. * * @param clazz * the class whose methods are being retrieved. * @param filter * an optional filter; to get all methods pass in a {@code null} value. * @return * the filtered set of methods from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Method> getClassMethods(Class<?> clazz, Filter<Method> filter) { return getMethods(clazz, new And<Method>( filter != null ? filter : new True<Method>(), new IsStatic<Method>(), new Not<Method>( new IsOverridden<Method>() ) ) ); }
/** * Returns the filtered set of instance methods of the given class, including * those inherited from the super-classes. * * @param clazz * the class whose methods are being retrieved. * @param filter * an optional filter; to get all methods pass in a {@code null} value. * @return * the filtered set of methods from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Method> getInstanceMethods(Class<?> clazz, Filter<Method> filter) { return getMethods(clazz, new And<Method>( filter != null ? filter : new True<Method>(), new Not<Method>( new IsStatic<Method>() ), new Not<Method>( new IsOverridden<Method>() ) ) ); }
/** * Returns the filtered set of instance methods of the given class, including * those inherited from the super-classes. * * @param clazz * the class whose methods are being retrieved. * @param filter * an optional filter; to get all methods pass in a {@code null} value. * @return * the filtered set of methods from the given class and its super-classes. */ public static Set<Method> getInstanceMethods(Class<?> clazz, Filter<Method> filter) { return getMethods(clazz, new And<Method>( filter != null ? filter : new True<Method>(), new Not<Method>( new IsStatic<Method>() ), new Not<Method>( new IsOverridden<Method>() ) ) ); }
/** * Returns the filtered set of instance methods of the given class, including * those inherited from the super-classes. * * @param clazz * the class whose methods are being retrieved. * @param filter * an optional filter; to get all methods pass in a {@code null} value. * @return * the filtered set of methods from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Method> getInstanceMethods(Class<?> clazz, Filter<Method> filter) { return getMethods(clazz, new And<Method>( filter != null ? filter : new True<Method>(), new Not<Method>( new IsStatic<Method>() ), new Not<Method>( new IsOverridden<Method>() ) ) ); }
/** * Returns the filtered set of instance fields of the given class, including * those inherited from the super-classes. * * @param clazz * the class whose fields are being retrieved. * @param filter * an optional filter; to get all fields pass in a {@code null} value. * @return * the filtered set of fields from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Field> getInstanceFields(Class<?> clazz, Filter<Field> filter) { return getFields(clazz, new And<Field>( filter != null ? filter : new True<Field>(), new Not<Field>( new IsStatic<Field>() ), new Not<Field>( new IsOverridden<Field>() ) ) ); }
/** * Returns the filtered set of instance fields of the given class, including * those inherited from the super-classes. * * @param clazz * the class whose fields are being retrieved. * @param filter * an optional filter; to get all fields pass in a {@code null} value. * @return * the filtered set of fields from the given class and its super-classes. */ @SuppressWarnings("unchecked") public static Set<Field> getInstanceFields(Class<?> clazz, Filter<Field> filter) { return getFields(clazz, new And<Field>( filter != null ? filter : new True<Field>(), new Not<Field>( new IsStatic<Field>() ), new Not<Field>( new IsOverridden<Field>() ) ) ); }
/** * Returns the filtered set of instance fields of the given class, including * those inherited from the super-classes. * * @param clazz * the class whose fields are being retrieved. * @param filter * an optional filter; to get all fields pass in a {@code null} value. * @return * the filtered set of fields from the given class and its super-classes. */ public static Set<Field> getInstanceFields(Class<?> clazz, Filter<Field> filter) { return getFields(clazz, new And<Field>( filter != null ? filter : new True<Field>(), new Not<Field>( new IsStatic<Field>() ), new Not<Field>( new IsOverridden<Field>() ) ) ); }