/** * Returns <code>true</code> if some entry name has to be accepted. * @see #prepareEntryName(String, boolean) * @see #scanEntry(ClassPathEntry) */ protected boolean acceptEntry(final String entryName) { return rulesEntries.match(entryName); }
/** * Matches value against the set of rules using current white/black list mode. */ public boolean match(final V value) { return match(value, blacklist); } /**
/** * Returns <code>true</code> if some JAR file has to be accepted. */ protected boolean acceptJar(final File jarFile) { String path = jarFile.getAbsolutePath(); path = FileNameUtil.separatorsToUnix(path); return rulesJars.match(path); }
/** * Determine if file is accepted, based on include and exclude * rules. Called on each file entry (file or directory) and * returns <code>true</code> if file passes search criteria. * File is matched using {@link #getMatchingFilePath(java.io.File) matching file path}. * @see InExRules */ protected boolean acceptFile(final File file) { String matchingFilePath = getMatchingFilePath(file); if (rules.match(matchingFilePath)) { if (consumers != null) { consumers.accept(file); } return true; } return false; }
/** * Starts visiting properties. */ public void visit() { String[] properties = resolveProperties(source, declared); for (String name : properties) { if (name == null) { continue; } if (!rules.match(name, blacklist)) { continue; } Object value; String propertyName = name; if (isSourceMap) { propertyName = LEFT_SQ_BRACKET + name + RIGHT_SQ_BRACKET; } if (declared) { value = BeanUtil.declared.getProperty(source, propertyName); } else { value = BeanUtil.pojo.getProperty(source, propertyName); } if (value == null && ignoreNullValues) { continue; } visitProperty(name, value); } }
assertFalse(inExRules.match("foo")); assertFalse(inExRules.match("fight")); assertFalse(inExRules.match("bar")); assertFalse(inExRules.match("foo")); assertFalse(inExRules.match("fight")); assertFalse(inExRules.match("bar")); assertTrue(inExRules.match("foo")); assertFalse(inExRules.match("fight")); assertFalse(inExRules.match("bar")); assertFalse(inExRules.match("foo")); assertTrue(inExRules.match("fight")); assertTrue(inExRules.match("bar")); assertTrue(inExRules.match("foo")); assertTrue(inExRules.match("fight")); assertTrue(inExRules.match("foo")); assertTrue(inExRules.match("fight")); assertTrue(inExRules.match("foo")); assertFalse(inExRules.match("fight")); assertTrue(inExRules.match("bar")); assertFalse(inExRules.match("foo")); assertTrue(inExRules.match("fight")); assertTrue(inExRules.match("fravia"));
if (typeData.rules.match(keyOriginal, !typeData.strict)) {
/** * Returns <code>true</code> if some entry name has to be accepted. * @see #prepareEntryName(String, boolean) * @see #scanEntry(ClassPathEntry) */ protected boolean acceptEntry(final String entryName) { return rulesEntries.match(entryName); }
/** * Matches value against the set of rules using current white/black list mode. */ public boolean match(final V value) { return match(value, blacklist); } /**
/** * Returns <code>true</code> if some JAR file has to be accepted. */ protected boolean acceptJar(final File jarFile) { String path = jarFile.getAbsolutePath(); path = FileNameUtil.separatorsToUnix(path); return rulesJars.match(path); }
/** * Determine if file is accepted, based on include and exclude * rules. Called on each file entry (file or directory) and * returns <code>true</code> if file passes search criteria. * File is matched using {@link #getMatchingFilePath(java.io.File) matching file path}. * @see InExRules */ protected boolean acceptFile(final File file) { String matchingFilePath = getMatchingFilePath(file); if (rules.match(matchingFilePath)) { if (consumers != null) { consumers.accept(file); } return true; } return false; }
/** * Starts visiting properties. */ public void visit() { String[] properties = resolveProperties(source, declared); for (String name : properties) { if (name == null) { continue; } if (!rules.match(name, blacklist)) { continue; } Object value; String propertyName = name; if (isSourceMap) { propertyName = LEFT_SQ_BRACKET + name + RIGHT_SQ_BRACKET; } if (declared) { value = BeanUtil.declared.getProperty(source, propertyName); } else { value = BeanUtil.pojo.getProperty(source, propertyName); } if (value == null && ignoreNullValues) { continue; } visitProperty(name, value); } }