1 19 package org.apache.beehive.netui.compiler.grammar; 20 21 import org.apache.beehive.netui.compiler.AnnotationGrammar; 22 import org.apache.beehive.netui.compiler.AnnotationMemberType; 23 import org.apache.beehive.netui.compiler.FatalCompileTimeException; 24 import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationInstance; 25 import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationTypeElementDeclaration; 26 import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationValue; 27 import org.apache.beehive.netui.compiler.typesystem.declaration.MemberDeclaration; 28 29 import java.util.Collection ; 30 31 public class ForwardToExternalPathType 32 extends DelegatingType 33 { 34 public ForwardToExternalPathType( AnnotationMemberType baseType, String requiredRuntimeVersion, 35 AnnotationGrammar parentGrammar ) 36 { 37 super( baseType, requiredRuntimeVersion, parentGrammar ); 38 } 39 40 41 public Object onCheck( AnnotationTypeElementDeclaration valueDecl, AnnotationValue value, 42 AnnotationInstance[] parentAnnotations, MemberDeclaration classMember, 43 int annotationArrayIndex ) 44 throws FatalCompileTimeException 45 { 46 String stringValue = ( String ) value.getValue(); 47 48 if ( stringValue.indexOf( '/' ) != -1 ) 54 { 55 BaseFlowControllerGrammar fcGrammar = ( BaseFlowControllerGrammar ) getParentGrammar(); 56 Collection messageResources = 57 fcGrammar.getFlowControllerInfo().getMergedControllerAnnotation().getMessageResources(); 58 if ( messageResources != null && messageResources.size() > 0 ) 59 { 60 addWarning( value, "warning.exception-handler-forward-to-external-page", stringValue ); 61 } 62 } 63 64 return super.onCheck( valueDecl, value, parentAnnotations, classMember, annotationArrayIndex ); 65 } 66 } 67 | Popular Tags |