@Override public T first() { Node r = raw.first(); if (!tClass.isInstance(r)) return null; return tClass.cast(r); }
@Override public T first() { Node r = raw.first(); if (!tClass.isInstance(r)) return null; return tClass.cast(r); }
@Override public T first() { Node r = raw.first(); if (!tClass.isInstance(r)) return null; return tClass.cast(r); }
@Override public P migrateAllFrom(RawListAccessor<?, ?> otherList) { while (!otherList.isEmpty()) { AbstractNode n = (AbstractNode) otherList.first(); otherList.remove(n); addToEnd(n); } return returnAsParent; }
@Override public P migrateAllFrom(RawListAccessor<?, ?> otherList) { while (!otherList.isEmpty()) { AbstractNode n = (AbstractNode) otherList.first(); otherList.remove(n); addToEnd(n); } return returnAsParent; }
@Override public P migrateAllFrom(RawListAccessor<?, ?> otherList) { while (!otherList.isEmpty()) { AbstractNode n = (AbstractNode) otherList.first(); otherList.remove(n); addToEnd(n); } return returnAsParent; }
int end = node.getPosition().getEnd(); if (node.astPackageDeclaration() != null) start = Math.min(start, node.astPackageDeclaration().getPosition().getStart()); if (!node.astImportDeclarations().isEmpty()) start = Math.min(start, node.rawImportDeclarations().first().getPosition().getStart()); if (!node.astTypeDeclarations().isEmpty()) start = Math.min(start, node.rawTypeDeclarations().first().getPosition().getStart()); if (start == Integer.MAX_VALUE) start = node.getPosition().getStart(); return set(node, setPos(start, end, topLevel));
int end = node.getPosition().getEnd(); if (node.astPackageDeclaration() != null) start = Math.min(start, node.astPackageDeclaration().getPosition().getStart()); if (!node.astImportDeclarations().isEmpty()) start = Math.min(start, node.rawImportDeclarations().first().getPosition().getStart()); if (!node.astTypeDeclarations().isEmpty()) start = Math.min(start, node.rawTypeDeclarations().first().getPosition().getStart()); if (start == Integer.MAX_VALUE) start = node.getPosition().getStart(); return set(node, setPos(start, end, topLevel));
int end = node.getPosition().getEnd(); if (node.astPackageDeclaration() != null) start = Math.min(start, node.astPackageDeclaration().getPosition().getStart()); if (!node.astImportDeclarations().isEmpty()) start = Math.min(start, node.rawImportDeclarations().first().getPosition().getStart()); if (!node.astTypeDeclarations().isEmpty()) start = Math.min(start, node.rawTypeDeclarations().first().getPosition().getStart()); if (start == Integer.MAX_VALUE) start = node.getPosition().getStart(); return set(node, setPos(start, end, topLevel));
Block tmp = new Block(); fillList(initializers, tmp.rawContents(), FlagKey.VARDEF_IS_DEFINITION); Node varDecl = tmp.rawContents().first(); if (varDecl != null) varDecl.unparent(); f.rawVariableDeclaration(varDecl);
Block tmp = new Block(); fillList(initializers, tmp.rawContents(), FlagKey.VARDEF_IS_DEFINITION); Node varDecl = tmp.rawContents().first(); if (varDecl != null) varDecl.unparent(); f.rawVariableDeclaration(varDecl);
Block tmp = new Block(); fillList(initializers, tmp.rawContents(), FlagKey.VARDEF_IS_DEFINITION); Node varDecl = tmp.rawContents().first(); if (varDecl != null) varDecl.unparent(); f.rawVariableDeclaration(varDecl);