@Override public AnnotationSource<JavaAnnotationSource> getAnnotation() { Expression expr = member.getDefault(); if (expr instanceof org.eclipse.jdt.core.dom.Annotation) { return new AnnotationValue(parent, expr); } return null; }
@Override public String getLiteral() { Expression expr = member.getDefault(); return expr == null ? null : expr.toString(); }
@Override public Class<?> getSingleClass() { final Expression expr = member.getDefault(); if (expr instanceof TypeLiteral) { return resolveTypeLiteral((TypeLiteral) expr); } return null; }
@Override public Class<?> getSingleClass() { final Expression expr = member.getDefault(); if (expr instanceof TypeLiteral) { return resolveTypeLiteral((TypeLiteral) expr); } return null; }
public String getDefaultValue() { if (defaultValue == UNITIALIZED_STRING) { defaultValue = getFacadeHelper().toString(getASTNode().getDefault()); if (defaultValue == null) { defaultValue = ""; } } return defaultValue; }
@Override public boolean visit(AnnotationTypeMemberDeclaration node) { handleToken(node.getName(), TokenNameIdentifier, true, false); handleToken(node.getName(), TokenNameLPAREN, this.options.insert_space_before_opening_paren_in_annotation_type_member_declaration, false); handleEmptyParens(node.getName(), this.options.insert_space_between_empty_parens_in_annotation_type_member_declaration); if (node.getDefault() != null) handleTokenBefore(node.getDefault(), TokenNamedefault, true, true); return true; }
@Override public boolean visit(AnnotationTypeMemberDeclaration node) { handleToken(node.getName(), TokenNameIdentifier, true, false); handleToken(node.getName(), TokenNameLPAREN, this.options.insert_space_before_opening_paren_in_annotation_type_member_declaration, false); handleEmptyParens(node.getName(), this.options.insert_space_between_empty_parens_in_annotation_type_member_declaration); if (node.getDefault() != null) handleTokenBefore(node.getDefault(), TokenNamedefault, true, true); return true; }
public void endVisit(AnnotationTypeMemberDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getType(), node.getDefault()); info.setNoReturn(); }
@Override public void endVisit(AnnotationTypeMemberDeclaration node) { if (skipNode(node)) { return; } GenericSequentialFlowInfo info = processSequential(node, node.getType(), node.getDefault()); info.setNoReturn(); }
public boolean visit(AnnotationTypeMemberDeclaration node) { IValueList extendedModifiers = parseExtendedModifiers(node.modifiers()); IValue typeArgument = visitChild(node.getType()); String name = node.getName().getFullyQualifiedName(); IValue defaultBlock = node.getDefault() == null ? null : visitChild(node.getDefault()); ownValue = constructDeclarationNode("annotationTypeMember", typeArgument, values.string(name), defaultBlock); setKeywordParameters("modifiers", extendedModifiers); return false; }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + this.modifiers.listSize() + (this.memberName == null ? 0 : getName().treeSize()) + (this.memberType == null ? 0 : getType().treeSize()) + (this.optionalDefaultValue == null ? 0 : getDefault().treeSize()); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + this.modifiers.listSize() + (this.memberName == null ? 0 : getName().treeSize()) + (this.memberType == null ? 0 : getType().treeSize()) + (this.optionalDefaultValue == null ? 0 : getDefault().treeSize()); } }
@Override int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + this.modifiers.listSize() + (this.memberName == null ? 0 : getName().treeSize()) + (this.memberType == null ? 0 : getType().treeSize()) + (this.optionalDefaultValue == null ? 0 : getDefault().treeSize()); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + this.modifiers.listSize() + (this.memberName == null ? 0 : getName().treeSize()) + (this.memberType == null ? 0 : getType().treeSize()) + (this.optionalDefaultValue == null ? 0 : getDefault().treeSize()); } }
void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { // visit children in normal left to right reading order acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.modifiers); acceptChild(visitor, getType()); acceptChild(visitor, getName()); acceptChild(visitor, getDefault()); } visitor.endVisit(this); }
@Override void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { // visit children in normal left to right reading order acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.modifiers); acceptChild(visitor, getType()); acceptChild(visitor, getName()); acceptChild(visitor, getDefault()); } visitor.endVisit(this); }
void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { // visit children in normal left to right reading order acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.modifiers); acceptChild(visitor, getType()); acceptChild(visitor, getName()); acceptChild(visitor, getDefault()); } visitor.endVisit(this); }
void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { // visit children in normal left to right reading order acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.modifiers); acceptChild(visitor, getType()); acceptChild(visitor, getName()); acceptChild(visitor, getDefault()); } visitor.endVisit(this); }
ASTNode clone0(AST target) { AnnotationTypeMemberDeclaration result = new AnnotationTypeMemberDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setType((Type) ASTNode.copySubtree(target, getType())); result.setName((SimpleName) getName().clone(target)); result.setDefault((Expression) ASTNode.copySubtree(target, getDefault())); return result; }
ASTNode clone0(AST target) { AnnotationTypeMemberDeclaration result = new AnnotationTypeMemberDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setType((Type) ASTNode.copySubtree(target, getType())); result.setName((SimpleName) getName().clone(target)); result.setDefault((Expression) ASTNode.copySubtree(target, getDefault())); return result; }