Hide setImage

This commit is contained in:
Clément Fournier
2020-04-23 20:44:29 +02:00
parent 786a09bed0
commit 81c3743430
15 changed files with 78 additions and 40 deletions

View File

@ -12,6 +12,7 @@ import net.sourceforge.pmd.lang.ast.impl.AbstractNodeWithTextCoordinates;
abstract class AbstractEcmascriptNode<T extends AstNode> extends AbstractNodeWithTextCoordinates<EcmascriptNode<?>> implements EcmascriptNode<T> {
protected final T node;
private String image;
AbstractEcmascriptNode(T node) {
this.node = node;
@ -21,6 +22,15 @@ abstract class AbstractEcmascriptNode<T extends AstNode> extends AbstractNodeWit
super.addChild(child, index);
}
@Override
public String getImage() {
return image;
}
protected void setImage(String image) {
this.image = image;
}
/* package private */
void calculateLineNumbers(SourceCodePositioner positioner) {
int startOffset = node.getAbsolutePosition();

View File

@ -26,10 +26,10 @@ abstract class AbstractInfixEcmascriptNode<T extends InfixExpression> extends Ab
}
public EcmascriptNode<?> getLeft() {
return (EcmascriptNode<?>) getChild(0);
return getChild(0);
}
public EcmascriptNode<?> getRight() {
return (EcmascriptNode<?>) getChild(1);
return getChild(1);
}
}