1 18 package org.apache.beehive.netui.compiler.grammar; 19 20 import org.apache.beehive.netui.compiler.AnnotationMemberType; 21 import org.apache.beehive.netui.compiler.AnnotationGrammar; 22 import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationValue; 23 import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationInstance; 24 import org.apache.beehive.netui.compiler.typesystem.declaration.MemberDeclaration; 25 import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationTypeElementDeclaration; 26 27 28 29 public class MessageKeyType 30 extends AnnotationMemberType 31 { 32 public MessageKeyType( String requiredRuntimeVersion, AnnotationGrammar parentGrammar ) 33 { 34 super( requiredRuntimeVersion, parentGrammar ); 35 } 36 37 38 public Object onCheck( AnnotationTypeElementDeclaration valueDecl, AnnotationValue member, 39 AnnotationInstance[] parentAnnotations, MemberDeclaration classMember, 40 int annotationArrayIndex ) 41 { 42 if ( ( ( String ) member.getValue() ).length() == 0 ) 43 { 44 addError( member, "error.empty-string-not-allowed" ); 45 } 46 71 72 return null; 73 } 74 } 75 | Popular Tags |