xdoclet.tagshandler
public class TypeTagsHandler extends XDocletTagSupport
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_CONCRETE_TYPE
|
static int |
TYPE_HIERARCHY
|
static int |
TYPE_SUPERCLASS
|
FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER
Constructor and Description |
---|
TypeTagsHandler() |
Modifier and Type | Method and Description |
---|---|
static int |
extractExtentType(java.lang.String extent_str)
Return the integer constant based on the extent_str.
|
void |
ifIsNotOfType(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the entity is not of the specified type.
|
void |
ifIsNotPrimitive(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the value is not of a primitive type.
|
void |
ifIsNotPrimitiveArray(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the value is not of a primitive array type.
|
void |
ifIsNotPrimitiveOrString(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the value is of a primitive type or String.
|
protected void |
ifIsOfType_Impl(java.lang.String template,
java.util.Properties attributes,
boolean condition)
Implementation of
ifIsOfType and ifIsNotOfType tags. |
void |
ifIsOfType(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the entity is of the specified type.
|
void |
ifIsPrimitive(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the value is of a primitive type.
|
void |
ifIsPrimitiveArray(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the value is of a primitive array type.
|
void |
ifIsPrimitiveOrString(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if the value is of a primitive type or String.
|
static boolean |
isOfType(xjavadoc.XClass clazz,
java.lang.String type,
int extent)
Returns true if cur_class is of type type.
|
static boolean |
isPrimitiveArray(java.lang.String name)
Returns true if name is a primitive type and is an array (ends with [])
|
static boolean |
isPrimitiveType(java.lang.String name)
Returns true if name is a primitive type, in that case name contains the string "int"/"float"/etc.
|
java.lang.String |
typeWithoutDimensions(java.util.Properties attributes)
Returns the type specified with the
type parameter without dimensions. |
delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
getXJavaDoc, setXJavaDoc
public static final int TYPE_CONCRETE_TYPE
isOfType(xjavadoc.XClass, java.lang.String, int)
. The isOfType method searches for the type according to the type parameter. TYPE_CONCRETE_TYPE
specifies that only the type of the current entity (class, method return type, parameter type depending on the
context) should be checked for equality.public static final int TYPE_SUPERCLASS
isOfType(xjavadoc.XClass, java.lang.String, int)
. The isOfType method searches for the type according to the type parameter. TYPE_SUPERCLASS
specifies that not only the type of the current entity (class, method return type, parameter type depending on
the context) should be checked for equality, but also direct superclasses and interfaces of the entity.public static final int TYPE_HIERARCHY
isOfType(xjavadoc.XClass, java.lang.String, int)
. The isOfType method searches for the type according to the type parameter. TYPE_HIERARCHY
specifies that not only the type of the current entity (class, method return type, parameter type depending on
the context) should be checked for equality, but also superclasses and interfaces of the entity and recursively
superclasses and interfaces.public static boolean isPrimitiveType(java.lang.String name)
name
- The passed type to checkpublic static boolean isPrimitiveArray(java.lang.String name)
name
- The name of the type.isPrimitiveType(java.lang.String)
public static boolean isOfType(xjavadoc.XClass clazz, java.lang.String type, int extent)
clazz
- The passed class to compare to the reference typetype
- The reference typeextent
- One of TypeTagsHandler.TYPE_*TYPE_HIERARCHY
,
TYPE_CONCRETE_TYPE
,
TYPE_SUPERCLASS
public static int extractExtentType(java.lang.String extent_str)
extent_str
- Description of ParameterClassTagsHandler.forAllClasses(java.lang.String,java.util.Properties)
,
ifIsOfType_Impl(java.lang.String,java.util.Properties,boolean)
,
TYPE_HIERARCHY
,
TYPE_CONCRETE_TYPE
,
TYPE_SUPERCLASS
public void ifIsPrimitive(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsNotPrimitive(java.lang.String,java.util.Properties)
,
isPrimitiveType(java.lang.String)
public void ifIsPrimitiveArray(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsNotPrimitiveArray(java.lang.String,java.util.Properties)
,
isPrimitiveArray(java.lang.String)
public void ifIsNotPrimitiveArray(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsPrimitiveArray(java.lang.String,java.util.Properties)
,
isPrimitiveArray(java.lang.String)
public void ifIsPrimitiveOrString(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsNotPrimitive(java.lang.String,java.util.Properties)
,
isPrimitiveType(java.lang.String)
public void ifIsNotPrimitiveOrString(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsNotPrimitive(java.lang.String,java.util.Properties)
,
isPrimitiveType(java.lang.String)
public void ifIsNotPrimitive(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- If the evaluation of the body block fails.ifIsPrimitive(java.lang.String,java.util.Properties)
,
isPrimitiveType(java.lang.String)
public void ifIsNotOfType(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsOfType(java.lang.String,java.util.Properties)
public void ifIsOfType(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsNotOfType(java.lang.String,java.util.Properties)
public java.lang.String typeWithoutDimensions(java.util.Properties attributes) throws XDocletException
type
parameter without dimensions.attributes
- XDocletException
String[][]
will be returned as String
."protected void ifIsOfType_Impl(java.lang.String template, java.util.Properties attributes, boolean condition) throws XDocletException
ifIsOfType
and ifIsNotOfType
tags.template
- The body of the block tagattributes
- The attributes of the template tagcondition
- Whether to look for a match (true) or non-match (false)XDocletException
- Description of ExceptionifIsOfType(java.lang.String,java.util.Properties)
,
ifIsNotOfType(java.lang.String,java.util.Properties)