public void setOptions ( Doc p ) { if ( p == null ) return ; for ( Tag tag : p . tags ( "opt" ) ) setOption ( StringUtil . tokenize ( tag . text ( ) ) ) ; } /** * Check if the supplied string matches an entity specified * with the -hide parameter. * @return true if the string matches. */ public boolean matchesHideExpression ( String s ) { for ( Pattern hidePattern : hidePatterns ) { // micro-optimization because the "all pattern" is heavily used in UmlGraphDoc if ( hidePattern == allPattern ) return true ; Matcher m = hidePattern . matcher ( s ) ; if ( strictMatching ? m . matches ( ) : m . find ( ) ) return true ; } return false ; } /** * Check if the supplied string matches an entity specified * with the -include parameter. * @return true if the string matches. */ public boolean matchesIncludeExpression ( String s ) { for ( Pattern includePattern : includePatterns ) { Matcher m = includePattern . matcher ( s ) ; if ( strictMatching ? m . matches ( ) : m . find ( ) ) return true ; } return false ; } /** * Check if the supplied string matches an entity specified * with the -collpackages parameter. * @return true if the string matches. */ public boolean matchesCollPackageExpression ( String s ) { for ( Pattern collPattern : collPackages ) { Matcher m = collPattern . matcher ( s ) ; if ( strictMatching ? m . matches ( ) : m . find ( ) ) return true ; } return false ; } // ---------------------------------------------------------------- // OptionProvider methods // ---------------------------------------------------------------- public Options getOptionsFor ( ClassDoc cd ) { Options localOpt = getGlobalOptions ( ) ; localOpt . setOptions ( cd ) ; return localOpt ; } public Options getOptionsFor ( String name ) { return getGlobalOptions ( ) ; } public Options getGlobalOptions ( ) { return ( Options ) clone ( ) ; } public void overrideForClass ( Options opt , ClassDoc cd ) { // nothing to do }
Set the options based on the tag elements of the ClassDoc parameter