mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02:00
Made few methods final.
This commit is contained in:
parent
9c35d9bc4a
commit
c31f99c76e
3 changed files with 8 additions and 9 deletions
|
@ -60,7 +60,7 @@ public abstract class ASTNode implements IASTNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isFrozen() {
|
public final boolean isFrozen() {
|
||||||
return frozen;
|
return frozen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,14 +74,13 @@ public abstract class ASTNode implements IASTNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInactive() {
|
public void setInactive() {
|
||||||
if (frozen)
|
assertNotFrozen();
|
||||||
throw new IllegalStateException("attempt to modify frozen AST node"); //$NON-NLS-1$
|
|
||||||
active= false;
|
active= false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertNotFrozen() throws IllegalStateException {
|
protected final void assertNotFrozen() throws IllegalStateException {
|
||||||
if (frozen)
|
if (frozen)
|
||||||
throw new IllegalStateException("attempt to modify frozen AST node"); //$NON-NLS-1$
|
throw new IllegalStateException("Attempt to modify a frozen AST node"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -91,7 +90,7 @@ public abstract class ASTNode implements IASTNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ASTNodeProperty getPropertyInParent() {
|
public final ASTNodeProperty getPropertyInParent() {
|
||||||
return property;
|
return property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ public abstract class ASTNode implements IASTNode {
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLength() {
|
public final int getLength() {
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class ASTLiteralNode implements IASTNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ASTNodeProperty getPropertyInParent() {
|
public final ASTNodeProperty getPropertyInParent() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class PDOMASTAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ASTNodeProperty getPropertyInParent() {
|
public final ASTNodeProperty getPropertyInParent() {
|
||||||
return fDelegate.getPropertyInParent();
|
return fDelegate.getPropertyInParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue