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
|
||||
public boolean isFrozen() {
|
||||
public final boolean isFrozen() {
|
||||
return frozen;
|
||||
}
|
||||
|
||||
|
@ -74,14 +74,13 @@ public abstract class ASTNode implements IASTNode {
|
|||
}
|
||||
|
||||
public void setInactive() {
|
||||
if (frozen)
|
||||
throw new IllegalStateException("attempt to modify frozen AST node"); //$NON-NLS-1$
|
||||
assertNotFrozen();
|
||||
active= false;
|
||||
}
|
||||
|
||||
protected void assertNotFrozen() throws IllegalStateException {
|
||||
protected final void assertNotFrozen() throws IllegalStateException {
|
||||
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
|
||||
|
@ -91,7 +90,7 @@ public abstract class ASTNode implements IASTNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ASTNodeProperty getPropertyInParent() {
|
||||
public final ASTNodeProperty getPropertyInParent() {
|
||||
return property;
|
||||
}
|
||||
|
||||
|
@ -105,7 +104,7 @@ public abstract class ASTNode implements IASTNode {
|
|||
return offset;
|
||||
}
|
||||
|
||||
public int getLength() {
|
||||
public final int getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public class ASTLiteralNode implements IASTNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ASTNodeProperty getPropertyInParent() {
|
||||
public final ASTNodeProperty getPropertyInParent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ public class PDOMASTAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ASTNodeProperty getPropertyInParent() {
|
||||
public final ASTNodeProperty getPropertyInParent() {
|
||||
return fDelegate.getPropertyInParent();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue