public Node createAnnotationMethodDeclaration(Node modifiers, Node typeReference, Node name, List<org.parboiled.Node<Node>> dims, Node defaultValue) {
AnnotationMethodDeclaration decl = new AnnotationMethodDeclaration()
.astMethodName(createIdentifierIfNeeded(name, currentPos())).rawDefaultValue(defaultValue);
if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos()));
int extraDims = dims == null ? 0 : dims.size();
Node returnType = typeReference;
if (extraDims > 0 && returnType instanceof TypeReference) {
((TypeReference)returnType).astArrayDimensions(((TypeReference)returnType).astArrayDimensions() + extraDims);
}
decl.rawReturnTypeReference(returnType);
return posify(decl);