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:
Comparable
,GroovyTokenTypes
,GroovyClassDoc
,GroovyDoc
,GroovyProgramElementDoc
,GroovyType
public class SimpleGroovyClassDoc extends SimpleGroovyAbstractableElementDoc implements GroovyClassDoc
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
CODE_REGEX
static String
DOCROOT_PATTERN
static String
DOCROOT_PATTERN2
static Pattern
LINK_REGEX
static Pattern
LITERAL_REGEX
static Pattern
NAME_ARGS_REGEX
static Pattern
REF_LABEL_REGEX
static Pattern
SPLIT_ARGS_REGEX
static Pattern
TAG_REGEX
-
Fields inherited from interface org.codehaus.groovy.antlr.parser.GroovyTokenTypes
ABSTRACT, ANNOTATION, ANNOTATION_ARRAY_INIT, ANNOTATION_DEF, ANNOTATION_FIELD_DEF, ANNOTATION_MEMBER_VALUE_PAIR, ANNOTATIONS, ARRAY_DECLARATOR, ASSIGN, AT, BAND, BAND_ASSIGN, BIG_SUFFIX, BLOCK, BNOT, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, CASE_GROUP, CLASS_DEF, CLOSABLE_BLOCK, CLOSABLE_BLOCK_OP, CLOSURE_LIST, COLON, COMMA, COMPARE_TO, CTOR_CALL, CTOR_IDENT, DEC, DIGIT, DIGITS_WITH_UNDERSCORE, DIGITS_WITH_UNDERSCORE_OPT, DIV, DIV_ASSIGN, DOLLAR, DOLLAR_REGEXP_CTOR_END, DOLLAR_REGEXP_LITERAL, DOLLAR_REGEXP_SYMBOL, DOT, DYNAMIC_MEMBER, ELIST, ELVIS_OPERATOR, EMPTY_STAT, ENUM_CONSTANT_DEF, ENUM_DEF, EOF, EQUAL, ESC, ESCAPED_DOLLAR, ESCAPED_SLASH, EXPONENT, EXPR, EXTENDS_CLAUSE, FINAL, FLOAT_SUFFIX, FOR_CONDITION, FOR_EACH_CLAUSE, FOR_IN_ITERABLE, FOR_INIT, FOR_ITERATOR, GE, GT, HEX_DIGIT, IDENT, IDENTICAL, IMPLEMENTS_CLAUSE, IMPLICIT_PARAMETERS, IMPORT, INC, INDEX_OP, INSTANCE_INIT, INTERFACE_DEF, LABELED_ARG, LABELED_STAT, LAND, LBRACK, LCURLY, LE, LETTER, LIST_CONSTRUCTOR, LITERAL_as, LITERAL_assert, LITERAL_boolean, LITERAL_break, LITERAL_byte, LITERAL_case, LITERAL_catch, LITERAL_char, LITERAL_class, LITERAL_continue, LITERAL_def, LITERAL_default, LITERAL_double, LITERAL_else, LITERAL_enum, LITERAL_extends, LITERAL_false, LITERAL_finally, LITERAL_float, LITERAL_for, LITERAL_if, LITERAL_implements, LITERAL_import, LITERAL_in, LITERAL_instanceof, LITERAL_int, LITERAL_interface, LITERAL_long, LITERAL_native, LITERAL_new, LITERAL_null, LITERAL_package, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_return, LITERAL_short, LITERAL_static, LITERAL_super, LITERAL_switch, LITERAL_synchronized, LITERAL_this, LITERAL_threadsafe, LITERAL_throw, LITERAL_throws, LITERAL_trait, LITERAL_transient, LITERAL_true, LITERAL_try, LITERAL_void, LITERAL_volatile, LITERAL_while, LNOT, LOR, LPAREN, LT, MAP_CONSTRUCTOR, MEMBER_POINTER, METHOD_CALL, METHOD_DEF, MINUS, MINUS_ASSIGN, ML_COMMENT, MOD, MOD_ASSIGN, MODIFIERS, MULTICATCH, MULTICATCH_TYPES, NLS, NOT_EQUAL, NOT_IDENTICAL, NULL_TREE_LOOKAHEAD, NUM_BIG_DECIMAL, NUM_BIG_INT, NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG, OBJBLOCK, ONE_NL, OPTIONAL_DOT, PACKAGE_DEF, PARAMETER_DEF, PARAMETERS, PLUS, PLUS_ASSIGN, POST_DEC, POST_INC, QUESTION, RANGE_EXCLUSIVE, RANGE_INCLUSIVE, RBRACK, RCURLY, REGEX_FIND, REGEX_MATCH, REGEXP_CTOR_END, REGEXP_LITERAL, REGEXP_SYMBOL, RPAREN, SELECT_SLOT, SEMI, SH_COMMENT, SL, SL_ASSIGN, SL_COMMENT, SLIST, SPREAD_ARG, SPREAD_DOT, SPREAD_MAP_ARG, SR, SR_ASSIGN, STAR, STAR_ASSIGN, STAR_STAR, STAR_STAR_ASSIGN, STATIC_IMPORT, STATIC_INIT, STRICTFP, STRING_CH, STRING_CONSTRUCTOR, STRING_CTOR_END, STRING_CTOR_MIDDLE, STRING_CTOR_START, STRING_LITERAL, STRING_NL, SUPER_CTOR_CALL, TRAIT_DEF, TRIPLE_DOT, TYPE, TYPE_ARGUMENT, TYPE_ARGUMENTS, TYPE_LOWER_BOUNDS, TYPE_PARAMETER, TYPE_PARAMETERS, TYPE_UPPER_BOUNDS, TYPECAST, UNARY_MINUS, UNARY_PLUS, UNUSED_CONST, UNUSED_DO, UNUSED_GOTO, VARIABLE_DEF, VARIABLE_PARAMETER_DEF, VOCAB, WILDCARD_TYPE, WS
-
-
Constructor Summary
Constructors Constructor Description SimpleGroovyClassDoc(List<String> importedClassesAndPackages, String name)
SimpleGroovyClassDoc(List<String> importedClassesAndPackages, Map<String,String> aliases, String name)
SimpleGroovyClassDoc(List<String> importedClassesAndPackages, Map<String,String> aliases, String name, List<LinkArgument> links)
-
Method Summary
-
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 Detail
-
TAG_REGEX
public static final Pattern TAG_REGEX
-
DOCROOT_PATTERN2
public static final String DOCROOT_PATTERN2
- See Also:
- Constant Field Values
-
DOCROOT_PATTERN
public static final String DOCROOT_PATTERN
- See Also:
- Constant Field Values
-
LINK_REGEX
public static final Pattern LINK_REGEX
-
LITERAL_REGEX
public static final Pattern LITERAL_REGEX
-
CODE_REGEX
public static final Pattern CODE_REGEX
-
REF_LABEL_REGEX
public static final Pattern REF_LABEL_REGEX
-
NAME_ARGS_REGEX
public static final Pattern NAME_ARGS_REGEX
-
SPLIT_ARGS_REGEX
public static final Pattern SPLIT_ARGS_REGEX
-
-
Constructor Detail
-
SimpleGroovyClassDoc
public SimpleGroovyClassDoc(List<String> importedClassesAndPackages, Map<String,String> aliases, String name, List<LinkArgument> links)
-
SimpleGroovyClassDoc
public SimpleGroovyClassDoc(List<String> importedClassesAndPackages, Map<String,String> aliases, String name)
-
-
Method Detail
-
constructors
public GroovyConstructorDoc[] constructors()
returns a sorted array of constructors- Specified by:
constructors
in interfaceGroovyClassDoc
-
add
public boolean add(GroovyConstructorDoc constructor)
-
getOuter
public GroovyClassDoc getOuter()
-
setOuter
public void setOuter(GroovyClassDoc outer)
-
isGroovy
public boolean isGroovy()
-
setGroovy
public void setGroovy(boolean isgroovy)
-
innerClasses
public GroovyClassDoc[] innerClasses()
returns a sorted array of nested classes and interfaces- Specified by:
innerClasses
in interfaceGroovyClassDoc
-
addNested
public boolean addNested(GroovyClassDoc nestedClass)
-
fields
public GroovyFieldDoc[] fields()
returns a sorted array of fields- Specified by:
fields
in interfaceGroovyClassDoc
-
add
public boolean add(GroovyFieldDoc field)
-
properties
public GroovyFieldDoc[] properties()
returns a sorted array of properties- Specified by:
properties
in interfaceGroovyClassDoc
-
addProperty
public boolean addProperty(GroovyFieldDoc property)
-
enumConstants
public GroovyFieldDoc[] enumConstants()
returns a sorted array of enum constants- Specified by:
enumConstants
in interfaceGroovyClassDoc
-
addEnumConstant
public boolean addEnumConstant(GroovyFieldDoc field)
-
methods
public GroovyMethodDoc[] methods()
returns a sorted array of methods- Specified by:
methods
in interfaceGroovyClassDoc
-
add
public boolean add(GroovyMethodDoc method)
-
getSuperClassName
public String getSuperClassName()
-
setSuperClassName
public void setSuperClassName(String className)
-
superclass
public GroovyClassDoc superclass()
- Specified by:
superclass
in interfaceGroovyClassDoc
-
setSuperClass
public void setSuperClass(GroovyClassDoc doc)
-
getFullPathName
public String getFullPathName()
- Specified by:
getFullPathName
in interfaceGroovyClassDoc
-
setFullPathName
public void setFullPathName(String fullPathName)
-
getRelativeRootPath
public String getRelativeRootPath()
- Specified by:
getRelativeRootPath
in interfaceGroovyClassDoc
-
getParentClasses
public List<GroovyClassDoc> getParentClasses()
-
getParentInterfaces
public Set<GroovyClassDoc> getParentInterfaces()
-
getDocUrl
public static String getDocUrl(String type, boolean full, List<LinkArgument> links, String relativePath, GroovyRootDoc rootDoc, SimpleGroovyClassDoc classDoc)
-
constructors
public GroovyConstructorDoc[] constructors(boolean filter)
- Specified by:
constructors
in interfaceGroovyClassDoc
-
definesSerializableFields
public boolean definesSerializableFields()
- Specified by:
definesSerializableFields
in interfaceGroovyClassDoc
-
fields
public GroovyFieldDoc[] fields(boolean filter)
- Specified by:
fields
in interfaceGroovyClassDoc
-
findClass
public GroovyClassDoc findClass(String className)
- Specified by:
findClass
in interfaceGroovyClassDoc
-
importedClasses
public GroovyClassDoc[] importedClasses()
- Specified by:
importedClasses
in interfaceGroovyClassDoc
-
importedPackages
public GroovyPackageDoc[] importedPackages()
- Specified by:
importedPackages
in interfaceGroovyClassDoc
-
innerClasses
public GroovyClassDoc[] innerClasses(boolean filter)
- Specified by:
innerClasses
in interfaceGroovyClassDoc
-
interfaces
public GroovyClassDoc[] interfaces()
- Specified by:
interfaces
in interfaceGroovyClassDoc
-
interfaceTypes
public GroovyType[] 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
public GroovyMethodDoc[] methods(boolean filter)
- Specified by:
methods
in interfaceGroovyClassDoc
-
serializableFields
public GroovyFieldDoc[] serializableFields()
- Specified by:
serializableFields
in interfaceGroovyClassDoc
-
serializationMethods
public GroovyMethodDoc[] serializationMethods()
- Specified by:
serializationMethods
in interfaceGroovyClassDoc
-
subclassOf
public boolean subclassOf(GroovyClassDoc gcd)
- Specified by:
subclassOf
in interfaceGroovyClassDoc
-
superclassType
public GroovyType superclassType()
- Specified by:
superclassType
in interfaceGroovyClassDoc
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitive
in interfaceGroovyType
-
qualifiedTypeName
public 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 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 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(String className)
-
firstSentenceCommentText
public String firstSentenceCommentText()
- Specified by:
firstSentenceCommentText
in interfaceGroovyDoc
- Overrides:
firstSentenceCommentText
in classSimpleGroovyDoc
-
commentText
public String commentText()
- Specified by:
commentText
in interfaceGroovyDoc
- Overrides:
commentText
in classSimpleGroovyDoc
-
replaceAllTags
public static String replaceAllTags(String self, String s1, String s2, Pattern regex, List<LinkArgument> links, String relPath, GroovyRootDoc rootDoc, SimpleGroovyClassDoc classDoc)
-
replaceAllTagsCollated
public String replaceAllTagsCollated(String self, String preKey, String postKey, String valueSeparator, String postValues, Pattern regex)
-
encodeAngleBracketsInTagBody
public static String encodeAngleBracketsInTagBody(String text, 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
-
setNameWithTypeArgs
public void setNameWithTypeArgs(String nameWithTypeArgs)
-
getNameWithTypeArgs
public String getNameWithTypeArgs()
-
-