1
0
Fork 0
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:
Sergey Prigogin 2014-10-07 14:36:03 -07:00
parent 9c35d9bc4a
commit c31f99c76e
3 changed files with 8 additions and 9 deletions

View file

@ -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;
}

View file

@ -75,7 +75,7 @@ public class ASTLiteralNode implements IASTNode {
}
@Override
public ASTNodeProperty getPropertyInParent() {
public final ASTNodeProperty getPropertyInParent() {
return null;
}

View file

@ -142,7 +142,7 @@ public class PDOMASTAdapter {
}
@Override
public ASTNodeProperty getPropertyInParent() {
public final ASTNodeProperty getPropertyInParent() {
return fDelegate.getPropertyInParent();
}