|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.umlgraph.doclet.ContextMatcher
public class ContextMatcher
Matches classes that are directly connected to one of the classes matched by the regual expression specified. The context center is computed by regex lookup. Depending on the specified Options, inferred relations and dependencies will be used as well.
This class needs to perform quite a bit of computations in order to gather the network of class releationships, so you are allowed to reuse it should you
Nested Class Summary | |
---|---|
private static class |
ContextMatcher.ClassGraphHack
A quick hack to compute class dependencies reusing ClassGraph but without generating output. |
private static class |
ContextMatcher.DevNullWriter
Simple dev/null imitation |
Field Summary | |
---|---|
(package private) ContextMatcher.ClassGraphHack |
cg
|
(package private) boolean |
keepParentHide
|
(package private) java.util.List<com.sun.javadoc.ClassDoc> |
matched
|
(package private) Options |
opt
|
(package private) java.util.regex.Pattern |
pattern
|
(package private) com.sun.javadoc.RootDoc |
root
|
(package private) java.util.Set<java.lang.String> |
visited
|
Constructor Summary | |
---|---|
ContextMatcher(com.sun.javadoc.RootDoc root,
java.util.regex.Pattern pattern,
Options options,
boolean keepParentHide)
Builds the context matcher |
Method Summary | |
---|---|
private void |
addToGraph(com.sun.javadoc.ClassDoc cd)
Adds the specified class to the internal class graph along with its relations and depencies, eventually inferring them, according to the Options specified for this matcher |
boolean |
matches(com.sun.javadoc.ClassDoc cd)
Returns the options for the specified class. |
boolean |
matches(java.lang.String name)
Returns the options for the specified class. |
void |
setContextCenter(java.util.regex.Pattern pattern)
Can be used to setup a different pattern for this context matcher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
ContextMatcher.ClassGraphHack cg
java.util.regex.Pattern pattern
java.util.List<com.sun.javadoc.ClassDoc> matched
java.util.Set<java.lang.String> visited
Options opt
com.sun.javadoc.RootDoc root
boolean keepParentHide
Constructor Detail |
---|
public ContextMatcher(com.sun.javadoc.RootDoc root, java.util.regex.Pattern pattern, Options options, boolean keepParentHide) throws java.io.IOException
root
- The root doc returned by JavaDocpattern
- The pattern that will match the "center" of this
contextopt
- The options will be used to decide on inferencekeepParentHide
- If true, parent option hide patterns will be
preserved, so that classes hidden by the options won't
be shown in the contextfullContext
- If true, all the classes related to the context
center will be included, otherwise it will match only
the classes referred with an outgoing relation from
the context center
java.io.IOException
Method Detail |
---|
public void setContextCenter(java.util.regex.Pattern pattern)
This can be used to speed up subsequent matching with the same global options, since the class network informations will be reused.
pattern
- private void addToGraph(com.sun.javadoc.ClassDoc cd)
cd
- public boolean matches(com.sun.javadoc.ClassDoc cd)
ClassMatcher
matches
in interface ClassMatcher
ClassMatcher.matches(com.sun.javadoc.ClassDoc)
public boolean matches(java.lang.String name)
ClassMatcher
matches
in interface ClassMatcher
ClassMatcher.matches(java.lang.String)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |