if ( ! ( type instanceof ClassDeclaration ) )
{
return false;
}
ClassDeclaration classDecl = ( ClassDeclaration ) type;
do
{
//
// First look through the action methods.
//
MethodDeclaration[] methods = classDecl.getMethods();
for ( int i = 0; i < methods.length; i++ )
{
MethodDeclaration method = methods[i];
if ( method.getSimpleName().equals( actionName )
&& CompilerUtils.getAnnotation( method, ACTION_TAG_NAME ) != null )
{
return true;
}
}
//
// Next, look through the simple actions (annotations).
//
Collection simpleActionAnnotations =
CompilerUtils.getAnnotationArrayValue( classDecl, CONTROLLER_TAG_NAME, SIMPLE_ACTIONS_ATTR, true );
if ( simpleActionAnnotations != null )
{
for ( Iterator i = simpleActionAnnotations.iterator(); i.hasNext(); )
{
AnnotationInstance ann = ( AnnotationInstance ) i.next();
String name = CompilerUtils.getString( ann, NAME_ATTR, false );
if ( actionName.equals( name )
&& ! CompilerUtils.annotationsAreEqual( ann, annotationToIgnore, false, env ) )
{
return true;
}
}
}
ClassType superType = classDecl.getSuperclass();
classDecl = superType != null ? superType.getClassTypeDeclaration() : null;
} while ( checkInheritedActions && classDecl != null );
return false;