Rename db types relating to local classes

These now all refer to types or classes-or-interfaces.
This commit is contained in:
Chris Smowton
2021-09-02 14:47:23 +01:00
parent e8bdc8ba17
commit 29b9231f49
6 changed files with 17 additions and 15 deletions

View File

@@ -440,10 +440,10 @@ isAnonymClass(
int parent: @classinstancexpr ref
);
#keyset[classid] #keyset[parent]
isLocalClass(
int classid: @classorinterface ref,
int parent: @localclassdeclstmt ref
#keyset[typeid] #keyset[parent]
isLocalClassOrInterface(
int typeid: @classorinterface ref,
int parent: @localtypedeclstmt ref
);
isDefConstr(
@@ -526,7 +526,7 @@ case @stmt.kind of
| 15 = @labeledstmt
| 16 = @assertstmt
| 17 = @localvariabledeclstmt
| 18 = @localclassdeclstmt
| 18 = @localtypedeclstmt
| 19 = @constructorinvocationstmt
| 20 = @superconstructorinvocationstmt
| 21 = @case

View File

@@ -16910,7 +16910,7 @@
</dependencies>
</relation>
<relation>
<name>isLocalClass</name>
<name>isLocalClassOrInterface</name>
<cardinality>349</cardinality>
<columnsizes>
<e>

View File

@@ -787,9 +787,9 @@ class LocalVariableDeclStmt extends Stmt, @localvariabledeclstmt {
}
/** A statement that declares a local class or interface. */
class LocalTypeDeclStmt extends Stmt, @localclassdeclstmt {
class LocalTypeDeclStmt extends Stmt, @localtypedeclstmt {
/** Gets the local type declared by this statement. */
LocalClassOrInterface getLocalType() { isLocalClass(result, this) }
LocalClassOrInterface getLocalType() { isLocalClassOrInterface(result, this) }
/**
* DEPRECATED: Renamed `getLocalType` to reflect the fact that

View File

@@ -722,7 +722,7 @@ class LocalClassOrInterface extends NestedType, ClassOrInterface {
LocalClassOrInterface() { this.isLocal() }
/** Gets the statement that declares this local class. */
LocalTypeDeclStmt getLocalTypeDeclStmt() { isLocalClass(this, result) }
LocalTypeDeclStmt getLocalTypeDeclStmt() { isLocalClassOrInterface(this, result) }
/**
* DEPRECATED: renamed `getLocalTypeDeclStmt` to reflect the fact that
@@ -864,7 +864,7 @@ class Interface extends ClassOrInterface, @interface {
/** A class or interface. */
class ClassOrInterface extends RefType, @classorinterface {
/** Holds if this class or interface is local. */
predicate isLocal() { isLocalClass(this, _) }
predicate isLocal() { isLocalClassOrInterface(this, _) }
/** Holds if this class or interface is package protected, that is, neither public nor private nor protected. */
predicate isPackageProtected() {

View File

@@ -440,10 +440,10 @@ isAnonymClass(
int parent: @classinstancexpr ref
);
#keyset[classid] #keyset[parent]
isLocalClass(
int classid: @classorinterface ref,
int parent: @localclassdeclstmt ref
#keyset[typeid] #keyset[parent]
isLocalClassOrInterface(
int typeid: @classorinterface ref,
int parent: @localtypedeclstmt ref
);
isDefConstr(
@@ -526,7 +526,7 @@ case @stmt.kind of
| 15 = @labeledstmt
| 16 = @assertstmt
| 17 = @localvariabledeclstmt
| 18 = @localclassdeclstmt
| 18 = @localtypedeclstmt
| 19 = @constructorinvocationstmt
| 20 = @superconstructorinvocationstmt
| 21 = @case

View File

@@ -1,2 +1,4 @@
description: Java 16: allow local interfaces
compatibility: backwards
isLocalClassOrInterface.rel: reorder isLocalClass.rel(int id, int parent) id parent
isLocalClass.rel: delete