JS: removed unused JsContext methods

This commit is contained in:
Alexey Tsvetkov
2015-03-27 16:05:38 +03:00
parent add0aca746
commit c8453ec0d9
2 changed files with 0 additions and 39 deletions
@@ -12,16 +12,11 @@ import org.jetbrains.annotations.Nullable;
* node.
*/
public abstract class JsContext<T extends JsNode> {
public abstract boolean canInsert();
public abstract boolean canRemove();
public abstract <R extends T> void insertAfter(R node);
public abstract <R extends T> void insertBefore(R node);
public abstract boolean isLvalue();
public abstract void removeMe();
public abstract <R extends T> void replaceMe(R node);
@@ -40,16 +40,6 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext {
private List<T> collection;
private int index;
@Override
public boolean canInsert() {
return true;
}
@Override
public boolean canRemove() {
return true;
}
@Override
public <R extends T> void insertAfter(R node) {
//noinspection unchecked
@@ -62,11 +52,6 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext {
collection.add(index++, (T) node);
}
@Override
public boolean isLvalue() {
return false;
}
@Override
public void removeMe() {
collection.remove(index--);
@@ -98,25 +83,11 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext {
}
private class LvalueContext extends NodeContext<JsExpression> {
@Override
public boolean isLvalue() {
return true;
}
}
private class NodeContext<T extends JsNode> extends JsContext<T> {
protected T node;
@Override
public boolean canInsert() {
return false;
}
@Override
public boolean canRemove() {
return false;
}
@Override
public <R extends T> void insertAfter(R node) {
throw new UnsupportedOperationException();
@@ -127,11 +98,6 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext {
throw new UnsupportedOperationException();
}
@Override
public boolean isLvalue() {
return false;
}
@Override
public void removeMe() {
throw new UnsupportedOperationException();