{
for ( ClassType type = jclass.getSuperclass();
type != null && CompilerUtils.isAssignableFrom( FLOWCONTROLLER_BASE_CLASS, type, getEnv() );
type = type.getSuperclass() )
{
TypeDeclaration decl = CompilerUtils.getDeclaration( type );
//
// Check simple actions in the Controller annotation.
//
List simpleActions =
CompilerUtils.getAnnotationArrayValue( decl, CONTROLLER_TAG_NAME, SIMPLE_ACTIONS_ATTR, true );
if ( simpleActions != null )
{
for ( Iterator j = simpleActions.iterator(); j.hasNext(); )
{
AnnotationInstance i = ( AnnotationInstance ) j.next();
checkRelativePath( i, PATH_ATTR, jclass, decl, false );
List conditionalForwards = CompilerUtils.getAnnotationArray( i, CONDITIONAL_FORWARDS_ATTR, true );
if ( conditionalForwards != null )
{
for ( Iterator k = conditionalForwards.iterator(); k.hasNext(); )
{
AnnotationInstance ann = ( AnnotationInstance ) k.next();
checkRelativePath( ann, PATH_ATTR, jclass, decl, false );
}
}
}
}
//
// Check Forwards in the Controller annotation.
//
List forwards = CompilerUtils.getAnnotationArrayValue( decl, CONTROLLER_TAG_NAME, FORWARDS_ATTR, true );
if ( forwards != null )
{
for ( Iterator ii = forwards.iterator(); ii.hasNext(); )
{
AnnotationInstance i = ( AnnotationInstance ) ii.next();
checkRelativePath( i, PATH_ATTR, jclass, decl, false );
}
}
//
// Check Catches in the Controller annotation.
//
List catches = CompilerUtils.getAnnotationArrayValue( decl, CONTROLLER_TAG_NAME, CATCHES_ATTR, true );
if ( catches != null )
{
for ( Iterator j = catches.iterator(); j.hasNext(); )
{
AnnotationInstance i = ( AnnotationInstance ) j.next();
checkRelativePath( i, PATH_ATTR, jclass, decl, false );
}
}
//
// Check strutsMerge and validatorMerge in the Controller annotation.
//
AnnotationInstance controllerAnnotation = CompilerUtils.getAnnotation( decl, CONTROLLER_TAG_NAME );
if ( controllerAnnotation != null )
{
checkRelativePath( controllerAnnotation, VALIDATOR_MERGE_ATTR, jclass, decl, true );
checkRelativePath( controllerAnnotation, STRUTSMERGE_ATTR, jclass, decl, true );
}
//
// Check Forwards and Catches on action methods and exception-handler methods.
//
MethodDeclaration[] methods = decl.getMethods();
for ( int i = 0; i < methods.length; i++ )
{
MethodDeclaration method = methods[i];
AnnotationInstance ann = CompilerUtils.getAnnotation( method, ACTION_TAG_NAME);
if ( ann == null ) ann = CompilerUtils.getAnnotation( method, EXCEPTION_HANDLER_TAG_NAME );