public class JavaClassConverterContext extends Object implements ConverterContext
Constructor and Description |
---|
JavaClassConverterContext(com.thoughtworks.qdox.model.JavaClass mojoClass,
com.thoughtworks.qdox.model.JavaClass declaringClass,
com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder,
Map<String,MojoAnnotatedClass> mojoAnnotatedClasses,
JavadocLinkGenerator linkGenerator,
int lineNumber) |
JavaClassConverterContext(com.thoughtworks.qdox.model.JavaClass mojoClass,
com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder,
Map<String,MojoAnnotatedClass> mojoAnnotatedClasses,
JavadocLinkGenerator linkGenerator,
int lineNumber) |
Modifier and Type | Method and Description |
---|---|
boolean |
canGetUrl() |
<T> T |
getAttribute(String name,
Class<T> clazz,
T defaultValue)
Retrieves some attribute value from the current context.
|
URI |
getInternalJavadocSiteBaseUrl()
Returns the base url to use for internal javadoc links
|
String |
getLocation() |
Optional<String> |
getModuleName() |
String |
getPackageName() |
String |
getStaticFieldValue(FullyQualifiedJavadocReference reference)
Returns the value of a referenced static field.
|
URI |
getUrl(FullyQualifiedJavadocReference reference)
Returns a (deep-)link to the javadoc page for the given reference
|
boolean |
isReferencedBy(FullyQualifiedJavadocReference reference) |
FullyQualifiedJavadocReference |
resolveReference(JavadocReference reference)
Resolves a given javadoc reference, according to the rules of
Javadoc's search order.
|
<T> T |
setAttribute(String name,
T value)
Stores some attribute in the current context
|
public JavaClassConverterContext(com.thoughtworks.qdox.model.JavaClass mojoClass, com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder, Map<String,MojoAnnotatedClass> mojoAnnotatedClasses, JavadocLinkGenerator linkGenerator, int lineNumber)
public JavaClassConverterContext(com.thoughtworks.qdox.model.JavaClass mojoClass, com.thoughtworks.qdox.model.JavaClass declaringClass, com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder, Map<String,MojoAnnotatedClass> mojoAnnotatedClasses, JavadocLinkGenerator linkGenerator, int lineNumber)
public Optional<String> getModuleName()
getModuleName
in interface ConverterContext
public String getPackageName()
getPackageName
in interface ConverterContext
public String getLocation()
getLocation
in interface ConverterContext
public boolean isReferencedBy(FullyQualifiedJavadocReference reference)
isReferencedBy
in interface ConverterContext
reference
- public boolean canGetUrl()
canGetUrl
in interface ConverterContext
true
if links to javadoc pages could potentially be generated with
ConverterContext.getUrl(FullyQualifiedJavadocReference)
.public URI getUrl(FullyQualifiedJavadocReference reference)
ConverterContext
getUrl
in interface ConverterContext
reference
- the reference for which to get the urlpublic FullyQualifiedJavadocReference resolveReference(JavadocReference reference)
ConverterContext
resolveReference
in interface ConverterContext
reference
- the reference to resolvepublic String getStaticFieldValue(FullyQualifiedJavadocReference reference)
ConverterContext
getStaticFieldValue
in interface ConverterContext
reference
- the code reference towards a static fieldreference
public URI getInternalJavadocSiteBaseUrl()
ConverterContext
getInternalJavadocSiteBaseUrl
in interface ConverterContext
null
).public <T> T setAttribute(String name, T value)
ConverterContext
setAttribute
in interface ConverterContext
public <T> T getAttribute(String name, Class<T> clazz, T defaultValue)
ConverterContext
getAttribute
in interface ConverterContext
null
if it does not existCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.