@Override public int getEndPosition() { int startPosition = getStartPosition(); return (startPosition == -1) ? -1 : startPosition + field.getLength(); }
@Override public boolean visit(FieldDeclaration aNode) { new de.tudarmstadt.ukp.teaching.uima.lesson2.type.FieldDeclaration(jcas, aNode .getStartPosition(), aNode.getStartPosition() + aNode.getLength()).addToIndexes(); return false; }
@Override public boolean visit(final FieldDeclaration node) { // Shift start position to after Javadoc (if present) shiftStartPosition(node); // Add to relevant containers final int line = cu.getLineNumber(node.getStartPosition()); fieldLineRanges.add(Range.singleton(line).canonical(DiscreteDomain.integers())); fieldLineParentNodes.put(line, node.getParent()); final Range<Integer> range = Range.closed(node.getStartPosition(), node.getStartPosition() + node.getLength() - 1); lineToFieldRanges.put(line, range); for (final Object fragment : node.fragments()) { final VariableDeclarationFragment frag = (VariableDeclarationFragment) fragment; // Split SIMPLE_NAME if token splitting enabled final SimpleName name = frag.getName(); final ArrayList<String> identifiers = Lists.newArrayList(); putSplitToken(identifiers, name.getIdentifier()); for (final String identifier : identifiers) fieldIdentifiers.put(range, identifier); // Remove field identifiers from parent class final FoldableNode parentClass = foldableStack.peek(); parentClass.removeTerms(identifiers); } return true; }
ASTNode clone0(AST target) { FieldDeclaration result = new FieldDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); } if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); } result.setType((Type) getType().clone(target)); result.fragments().addAll( ASTNode.copySubtrees(target, fragments())); return result; }
ASTNode clone0(AST target) { FieldDeclaration result = new FieldDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); } if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); } result.setType((Type) getType().clone(target)); result.fragments().addAll( ASTNode.copySubtrees(target, fragments())); return result; }
@Override ASTNode clone0(AST target) { FieldDeclaration result = new FieldDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); } if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); } result.setType((Type) getType().clone(target)); result.fragments().addAll( ASTNode.copySubtrees(target, fragments())); return result; }
ASTNode clone0(AST target) { FieldDeclaration result = new FieldDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); } if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); } result.setType((Type) getType().clone(target)); result.fragments().addAll( ASTNode.copySubtrees(target, fragments())); return result; }
ASTNode clone0(AST target) { FieldDeclaration result = new FieldDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); } if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); } result.setType((Type) getType().clone(target)); result.fragments().addAll( ASTNode.copySubtrees(target, fragments())); return result; }
ASTNode clone0(AST target) { FieldDeclaration result = new FieldDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.internalSetModifiers(getModifiers()); } if (this.ast.apiLevel >= AST.JLS3) { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); } result.setType((Type) getType().clone(target)); result.fragments().addAll( ASTNode.copySubtrees(target, fragments())); return result; }
TypeReferenceLocation.VARIABLE_INITIALIZER, lineNumber, columnNumber, node.getLength(), node.toString()); processTypeAsEnum(resolveBinding, expressionName, ResolutionStatus.RESOLVED, lineNumber, columnNumber, node.getLength(), extractDefinitionLine(node.toString())); columnNumber, node.getLength(), node.toString()); columnNumber, node.getLength(), node.toString()); TypeReferenceLocation.FIELD_DECLARATION, lineNumber, columnNumber, node.getLength(), node.toString());