return true;
}
private static Object parseValue( AnnotationTypeElementDeclaration memberDecl, String strValue, SourcePositionImpl pos )
{
TypeInstance type = memberDecl.getReturnType();
if ( type instanceof ClassType )
{
ClassType classType = ( ClassType ) type;
String typeName = classType.getClassTypeDeclaration().getQualifiedName();
if ( typeName.equals( "java.lang.String" ) )
{
return strValue;
}
else if ( typeName.equals( "java.lang.Class" ) )
{
TypeInstance retVal = XDocletCompilerUtils.resolveType( strValue, false, pos.getOuterClass() );
if ( retVal == null )
{
XDocletCompilerUtils.addError( pos, "error.unknown-class",
new String[]{ strValue, memberDecl.getSimpleName() } );
}
return XDocletCompilerUtils.resolveType( strValue, true, pos.getOuterClass() );
}
else
{
assert false : "unexpected type in annotation declaration: " + typeName;
}
}
else if ( type instanceof ArrayType )
{
ArrayType arrayType = ( ArrayType ) type;
TypeInstance componentType = arrayType.getComponentType();
// We only handle an array of strings -- nothing else at this point.
assert componentType instanceof DeclaredType : componentType.getClass().getName();
assert ( ( DeclaredType ) componentType ).getDeclaration().getQualifiedName().equals( String.class.getName() )
: ( ( DeclaredType ) componentType ).getDeclaration().getQualifiedName();
StringTokenizer tok = new StringTokenizer( strValue, "," );
ArrayList arrayValues = new ArrayList();
while ( tok.hasMoreTokens() )