|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.buildtools.maven2.plugin.builder.qdox.QdoxHelper
public class QdoxHelper
Helper class used by QdoxModelBuilder and provide utility methods.
Nested Class Summary | |
---|---|
static class |
QdoxHelper.JavaClassComparator
|
Constructor Summary | |
---|---|
QdoxHelper()
|
Method Summary | |
---|---|
static void |
addFileToJavaDocBuilder(com.thoughtworks.qdox.JavaDocBuilder builder,
org.codehaus.plexus.components.io.fileselectors.FileSelector selector,
File path)
Deprecated. |
static void |
addFileToJavaDocBuilder(com.thoughtworks.qdox.JavaDocBuilder builder,
org.codehaus.plexus.components.io.fileselectors.FileSelector selector,
File path,
String basePath)
Deprecated. |
static String |
clean(Object srcObj)
Remove all leading whitespace and a quotemark if it exists. |
static String |
evaluateParameterInitializationExpression(String value)
|
static com.thoughtworks.qdox.model.Annotation |
getAnnotation(com.thoughtworks.qdox.model.AbstractJavaEntity entity,
String annoName)
|
static Boolean |
getBoolean(com.thoughtworks.qdox.model.JavaClass clazz,
String key,
Map map,
Boolean dflt)
Get the named attribute from a doc-annotation and convert to a boolean. |
static String |
getFirstSentence(String doc)
Given the full javadoc for a component, extract just the "first sentence". |
static String |
getFullyQualifiedClassName(com.thoughtworks.qdox.model.JavaClass clazz,
String fqn)
|
static com.thoughtworks.qdox.model.JavaClass[] |
getSourceClasses(List sourceDirs,
String includes,
String excludes)
Deprecated. use IOUtils.visitSources(ModelParams, JavaSourceVisitor) |
static String |
getString(com.thoughtworks.qdox.model.JavaClass clazz,
String key,
Map map,
String dflt)
Get the named attribute from a doc-annotation. |
static void |
initBehaviorAncestry(Map javaClassByName,
Model model,
ClassMeta modelItem)
Same as initComponentAncestry but for converters |
static void |
initComponentAncestry(Map javaClassByName,
Model model,
ClassMeta modelItem)
For each component, try to find its "logical" parent component, ie the nearest superclass that is also annotated as a component and therefore has an entry in the model. |
static void |
initConverterAncestry(Map javaClassByName,
Model model,
ClassMeta modelItem)
Same as initComponentAncestry but for converters |
static void |
initFaceletTagHandlerAncestry(Map javaClassByName,
Model model,
ClassMeta modelItem)
|
static void |
initValidatorAncestry(Map javaClassByName,
Model model,
ClassMeta modelItem)
Same as initComponentAncestry but for validators. |
static boolean |
isTagClassMissing(String tagClassName,
List sourceDirs)
Returns true if the tagClassName is not null, but the corresponding source file cannot be found in the specified source dirs. |
static String |
methodToPropName(String methodName)
Convert a method name to a property name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QdoxHelper()
Method Detail |
---|
public static String methodToPropName(String methodName)
public static String getFirstSentence(String doc)
Initially, just find the first dot, and strip out any linefeeds. Later, try to handle "e.g." and similar (see javadoc algorithm for sentence detection).
public static String getFullyQualifiedClassName(com.thoughtworks.qdox.model.JavaClass clazz, String fqn)
public static void initComponentAncestry(Map javaClassByName, Model model, ClassMeta modelItem)
In most cases this could be done at the time the component is processed. The processClass() method does try to process the classes that qdox discovers in ancestor->descendant order.
However there is one case where this just doesn't work. Therefore a two-pass approach is used: first create a ComponentMeta for each component, and then on a second pass find the matching parent for each one.
The problem case is where an annotated java class extends a generated one. In this case when walking up the ancestry tree of the hand-written class we find an entry for which there is no ComponentMeta entry. We do not know whether this is because the parent exists but is not annotated, or whether a ComponentMeta for that parent will be generated once we have processed some other class that happens to have the matching annotation.
public static void initValidatorAncestry(Map javaClassByName, Model model, ClassMeta modelItem)
public static void initConverterAncestry(Map javaClassByName, Model model, ClassMeta modelItem)
public static com.thoughtworks.qdox.model.Annotation getAnnotation(com.thoughtworks.qdox.model.AbstractJavaEntity entity, String annoName)
public static void initBehaviorAncestry(Map javaClassByName, Model model, ClassMeta modelItem)
public static void initFaceletTagHandlerAncestry(Map javaClassByName, Model model, ClassMeta modelItem)
public static String evaluateParameterInitializationExpression(String value)
@Deprecated public static void addFileToJavaDocBuilder(com.thoughtworks.qdox.JavaDocBuilder builder, org.codehaus.plexus.components.io.fileselectors.FileSelector selector, File path)
@Deprecated public static void addFileToJavaDocBuilder(com.thoughtworks.qdox.JavaDocBuilder builder, org.codehaus.plexus.components.io.fileselectors.FileSelector selector, File path, String basePath)
public static String clean(Object srcObj)
Qdox comments like foo val= "bar"
return a value with
leading whitespace and quotes, so remove them.
public static String getString(com.thoughtworks.qdox.model.JavaClass clazz, String key, Map map, String dflt)
public static Boolean getBoolean(com.thoughtworks.qdox.model.JavaClass clazz, String key, Map map, Boolean dflt)
public static boolean isTagClassMissing(String tagClassName, List sourceDirs)
@Deprecated public static com.thoughtworks.qdox.model.JavaClass[] getSourceClasses(List sourceDirs, String includes, String excludes)
sourceDirs
- includes
- excludes
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |