Class SimpleGroovyClassDoc
java.lang.Object
org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyProgramElementDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyAbstractableElementDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDoc
- All Implemented Interfaces:
java.lang.Comparable
,GroovyClassDoc
,GroovyDoc
,GroovyProgramElementDoc
,GroovyType
public class SimpleGroovyClassDoc extends SimpleGroovyAbstractableElementDoc implements GroovyClassDoc
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.Pattern
CODE_REGEX
static java.lang.String
DOCROOT_PATTERN
static java.lang.String
DOCROOT_PATTERN2
static java.util.regex.Pattern
LINK_REGEX
static java.util.regex.Pattern
LITERAL_REGEX
static java.util.regex.Pattern
NAME_ARGS_REGEX
static java.util.regex.Pattern
REF_LABEL_REGEX
static java.util.regex.Pattern
SPLIT_ARGS_REGEX
static java.util.regex.Pattern
TAG_REGEX
Fields inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
ANNOTATION_DEF, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, TRAIT_DEF
-
Constructor Summary
Constructors Constructor Description SimpleGroovyClassDoc(java.util.List<java.lang.String> importedClassesAndPackages, java.lang.String name)
SimpleGroovyClassDoc(java.util.List<java.lang.String> importedClassesAndPackages, java.util.Map<java.lang.String,java.lang.String> aliases, java.lang.String name)
SimpleGroovyClassDoc(java.util.List<java.lang.String> importedClassesAndPackages, java.util.Map<java.lang.String,java.lang.String> aliases, java.lang.String name, java.util.List<LinkArgument> links)
-
Method Summary
Modifier and Type Method Description boolean
add(GroovyConstructorDoc constructor)
boolean
add(GroovyFieldDoc field)
boolean
add(GroovyMethodDoc method)
boolean
addEnumConstant(GroovyFieldDoc field)
void
addInterfaceName(java.lang.String className)
boolean
addNested(GroovyClassDoc nestedClass)
boolean
addProperty(GroovyFieldDoc property)
java.lang.String
commentText()
GroovyConstructorDoc[]
constructors()
returns a sorted array of constructorsGroovyConstructorDoc[]
constructors(boolean filter)
static java.lang.String
decodeSpecialSymbols(java.lang.String text)
boolean
definesSerializableFields()
static java.lang.String
encodeAngleBrackets(java.lang.String text)
static java.lang.String
encodeAngleBracketsInTagBody(java.lang.String text, java.util.regex.Pattern regex)
Replaces angle brackets inside a tag.static java.lang.String
encodeSpecialSymbols(java.lang.String text)
GroovyFieldDoc[]
enumConstants()
returns a sorted array of enum constantsGroovyFieldDoc[]
fields()
returns a sorted array of fieldsGroovyFieldDoc[]
fields(boolean filter)
GroovyClassDoc
findClass(java.lang.String className)
java.lang.String
firstSentenceCommentText()
java.lang.String
getDocUrl(java.lang.String type)
java.lang.String
getDocUrl(java.lang.String type, boolean full)
static java.lang.String
getDocUrl(java.lang.String type, boolean full, java.util.List<LinkArgument> links, java.lang.String relativePath, GroovyRootDoc rootDoc, SimpleGroovyClassDoc classDoc)
java.lang.String
getFullPathName()
java.lang.String
getNameWithTypeArgs()
GroovyClassDoc
getOuter()
java.util.List<GroovyClassDoc>
getParentClasses()
java.util.Set<GroovyClassDoc>
getParentInterfaces()
java.lang.String
getRelativeRootPath()
java.lang.String
getSuperClassName()
GroovyClassDoc[]
importedClasses()
GroovyPackageDoc[]
importedPackages()
GroovyClassDoc[]
innerClasses()
returns a sorted array of nested classes and interfacesGroovyClassDoc[]
innerClasses(boolean filter)
GroovyClassDoc[]
interfaces()
GroovyType[]
interfaceTypes()
boolean
isExternalizable()
boolean
isGroovy()
boolean
isPrimitive()
boolean
isSerializable()
GroovyMethodDoc[]
methods()
returns a sorted array of methodsGroovyMethodDoc[]
methods(boolean filter)
GroovyFieldDoc[]
properties()
returns a sorted array of propertiesjava.lang.String
qualifiedTypeName()
The qualified name of this type excluding any dimension information.java.lang.String
replaceAllTags(java.lang.String self, java.lang.String s1, java.lang.String s2, java.util.regex.Pattern regex)
static java.lang.String
replaceAllTags(java.lang.String self, java.lang.String s1, java.lang.String s2, java.util.regex.Pattern regex, java.util.List<LinkArgument> links, java.lang.String relPath, GroovyRootDoc rootDoc, SimpleGroovyClassDoc classDoc)
java.lang.String
replaceAllTagsCollated(java.lang.String self, java.lang.String preKey, java.lang.String postKey, java.lang.String valueSeparator, java.lang.String postValues, java.util.regex.Pattern regex)
java.lang.String
replaceTags(java.lang.String comment)
GroovyFieldDoc[]
serializableFields()
GroovyMethodDoc[]
serializationMethods()
void
setFullPathName(java.lang.String fullPathName)
void
setGroovy(boolean isgroovy)
void
setNameWithTypeArgs(java.lang.String nameWithTypeArgs)
void
setOuter(GroovyClassDoc outer)
void
setSuperClass(GroovyClassDoc doc)
void
setSuperClassName(java.lang.String className)
java.lang.String
simpleTypeName()
The unqualified name of this type excluding any dimension or nesting information.boolean
subclassOf(GroovyClassDoc gcd)
GroovyClassDoc
superclass()
GroovyType
superclassType()
java.lang.String
typeName()
The unqualified name of this type excluding any dimension information.Methods inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyAbstractableElementDoc
isAbstract, setAbstract
Methods inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyProgramElementDoc
addAnnotationRef, annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName, setContainingPackage, setFinal, setPackagePrivate, setPrivate, setProtected, setPublic, setStatic
Methods inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
calculateFirstSentence, compareTo, getRawCommentText, getTypeDescription, getTypeSourceDescription, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isDeprecated, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, isScript, isTrait, name, setCommentText, setDeprecated, setFirstSentenceCommentText, setRawCommentText, setScript, setTokenType, tags, tokenType, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.codehaus.groovy.groovydoc.GroovyClassDoc
isAbstract
Methods inherited from interface org.codehaus.groovy.groovydoc.GroovyDoc
getRawCommentText, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isDeprecated, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, setRawCommentText
Methods inherited from interface org.codehaus.groovy.groovydoc.GroovyProgramElementDoc
annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
Methods inherited from interface org.codehaus.groovy.groovydoc.GroovyType
toString
-
Field Details
-
TAG_REGEX
public static final java.util.regex.Pattern TAG_REGEX -
DOCROOT_PATTERN2
public static final java.lang.String DOCROOT_PATTERN2- See Also:
- Constant Field Values
-
DOCROOT_PATTERN
public static final java.lang.String DOCROOT_PATTERN- See Also:
- Constant Field Values
-
LINK_REGEX
public static final java.util.regex.Pattern LINK_REGEX -
LITERAL_REGEX
public static final java.util.regex.Pattern LITERAL_REGEX -
CODE_REGEX
public static final java.util.regex.Pattern CODE_REGEX -
REF_LABEL_REGEX
public static final java.util.regex.Pattern REF_LABEL_REGEX -
NAME_ARGS_REGEX
public static final java.util.regex.Pattern NAME_ARGS_REGEX -
SPLIT_ARGS_REGEX
public static final java.util.regex.Pattern SPLIT_ARGS_REGEX
-
-
Constructor Details
-
SimpleGroovyClassDoc
public SimpleGroovyClassDoc(java.util.List<java.lang.String> importedClassesAndPackages, java.util.Map<java.lang.String,java.lang.String> aliases, java.lang.String name, java.util.List<LinkArgument> links) -
SimpleGroovyClassDoc
public SimpleGroovyClassDoc(java.util.List<java.lang.String> importedClassesAndPackages, java.util.Map<java.lang.String,java.lang.String> aliases, java.lang.String name) -
SimpleGroovyClassDoc
public SimpleGroovyClassDoc(java.util.List<java.lang.String> importedClassesAndPackages, java.lang.String name)
-
-
Method Details
-
constructors
returns a sorted array of constructors- Specified by:
constructors
in interfaceGroovyClassDoc
-
add
-
getOuter
-
setOuter
-
isGroovy
public boolean isGroovy() -
setGroovy
public void setGroovy(boolean isgroovy) -
innerClasses
returns a sorted array of nested classes and interfaces- Specified by:
innerClasses
in interfaceGroovyClassDoc
-
addNested
-
fields
returns a sorted array of fields- Specified by:
fields
in interfaceGroovyClassDoc
-
add
-
properties
returns a sorted array of properties- Specified by:
properties
in interfaceGroovyClassDoc
-
addProperty
-
enumConstants
returns a sorted array of enum constants- Specified by:
enumConstants
in interfaceGroovyClassDoc
-
addEnumConstant
-
methods
returns a sorted array of methods- Specified by:
methods
in interfaceGroovyClassDoc
-
add
-
getSuperClassName
public java.lang.String getSuperClassName() -
setSuperClassName
public void setSuperClassName(java.lang.String className) -
superclass
- Specified by:
superclass
in interfaceGroovyClassDoc
-
setSuperClass
-
getFullPathName
public java.lang.String getFullPathName()- Specified by:
getFullPathName
in interfaceGroovyClassDoc
-
setFullPathName
public void setFullPathName(java.lang.String fullPathName) -
getRelativeRootPath
public java.lang.String getRelativeRootPath()- Specified by:
getRelativeRootPath
in interfaceGroovyClassDoc
-
getParentClasses
-
getParentInterfaces
-
getDocUrl
public java.lang.String getDocUrl(java.lang.String type) -
getDocUrl
public java.lang.String getDocUrl(java.lang.String type, boolean full) -
getDocUrl
public static java.lang.String getDocUrl(java.lang.String type, boolean full, java.util.List<LinkArgument> links, java.lang.String relativePath, GroovyRootDoc rootDoc, SimpleGroovyClassDoc classDoc) -
constructors
- Specified by:
constructors
in interfaceGroovyClassDoc
-
definesSerializableFields
public boolean definesSerializableFields()- Specified by:
definesSerializableFields
in interfaceGroovyClassDoc
-
fields
- Specified by:
fields
in interfaceGroovyClassDoc
-
findClass
- Specified by:
findClass
in interfaceGroovyClassDoc
-
importedClasses
- Specified by:
importedClasses
in interfaceGroovyClassDoc
-
importedPackages
- Specified by:
importedPackages
in interfaceGroovyClassDoc
-
innerClasses
- Specified by:
innerClasses
in interfaceGroovyClassDoc
-
interfaces
- Specified by:
interfaces
in interfaceGroovyClassDoc
-
interfaceTypes
- Specified by:
interfaceTypes
in interfaceGroovyClassDoc
-
isExternalizable
public boolean isExternalizable()- Specified by:
isExternalizable
in interfaceGroovyClassDoc
-
isSerializable
public boolean isSerializable()- Specified by:
isSerializable
in interfaceGroovyClassDoc
-
methods
- Specified by:
methods
in interfaceGroovyClassDoc
-
serializableFields
- Specified by:
serializableFields
in interfaceGroovyClassDoc
-
serializationMethods
- Specified by:
serializationMethods
in interfaceGroovyClassDoc
-
subclassOf
- Specified by:
subclassOf
in interfaceGroovyClassDoc
-
superclassType
- Specified by:
superclassType
in interfaceGroovyClassDoc
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitive
in interfaceGroovyType
-
qualifiedTypeName
public java.lang.String qualifiedTypeName()Description copied from interface:GroovyType
The qualified name of this type excluding any dimension information. For example, a two dimensional array of String returns "java.lang.String
".- Specified by:
qualifiedTypeName
in interfaceGroovyType
-
simpleTypeName
public java.lang.String simpleTypeName()Description copied from interface:GroovyType
The unqualified name of this type excluding any dimension or nesting information. For example, the classOuter.Inner
returns "Inner
".- Specified by:
simpleTypeName
in interfaceGroovyType
-
typeName
public java.lang.String typeName()Description copied from interface:GroovyType
The unqualified name of this type excluding any dimension information. For example, a two dimensional array of String returns "String
".- Specified by:
typeName
in interfaceGroovyType
-
addInterfaceName
public void addInterfaceName(java.lang.String className) -
firstSentenceCommentText
public java.lang.String firstSentenceCommentText()- Specified by:
firstSentenceCommentText
in interfaceGroovyDoc
- Overrides:
firstSentenceCommentText
in classSimpleGroovyDoc
-
commentText
public java.lang.String commentText()- Specified by:
commentText
in interfaceGroovyDoc
- Overrides:
commentText
in classSimpleGroovyDoc
-
replaceTags
public java.lang.String replaceTags(java.lang.String comment) -
replaceAllTags
public java.lang.String replaceAllTags(java.lang.String self, java.lang.String s1, java.lang.String s2, java.util.regex.Pattern regex) -
replaceAllTags
public static java.lang.String replaceAllTags(java.lang.String self, java.lang.String s1, java.lang.String s2, java.util.regex.Pattern regex, java.util.List<LinkArgument> links, java.lang.String relPath, GroovyRootDoc rootDoc, SimpleGroovyClassDoc classDoc) -
replaceAllTagsCollated
public java.lang.String replaceAllTagsCollated(java.lang.String self, java.lang.String preKey, java.lang.String postKey, java.lang.String valueSeparator, java.lang.String postValues, java.util.regex.Pattern regex) -
encodeAngleBracketsInTagBody
public static java.lang.String encodeAngleBracketsInTagBody(java.lang.String text, java.util.regex.Pattern regex)Replaces angle brackets inside a tag.- Parameters:
text
- GroovyDoc text to processregex
- has to capture tag name in group 1 and tag body in group 2
-
encodeAngleBrackets
public static java.lang.String encodeAngleBrackets(java.lang.String text) -
encodeSpecialSymbols
public static java.lang.String encodeSpecialSymbols(java.lang.String text) -
decodeSpecialSymbols
public static java.lang.String decodeSpecialSymbols(java.lang.String text) -
setNameWithTypeArgs
public void setNameWithTypeArgs(java.lang.String nameWithTypeArgs) -
getNameWithTypeArgs
public java.lang.String getNameWithTypeArgs()
-