Java: Clean up SpringHttp.qll

This commit is contained in:
Anders Schack-Mulligen
2020-07-06 14:35:53 +02:00
parent 2ae15f9ace
commit 2ce0921935

View File

@@ -1,39 +1,35 @@
import java
/** The class `org.springframework.http.HttpEntity` or an instantiation of it. */
class SpringHttpEntity extends Class {
SpringHttpEntity() {
getSourceDeclaration()
.getErasure()
.(RefType)
.hasQualifiedName("org.springframework.http", "HttpEntity")
this.getSourceDeclaration().hasQualifiedName("org.springframework.http", "HttpEntity")
}
}
/** The class `org.springframework.http.RequestEntity` or an instantiation of it. */
class SpringRequestEntity extends Class {
SpringRequestEntity() {
getSourceDeclaration()
.getErasure()
.(RefType)
.hasQualifiedName("org.springframework.http", "RequestEntity")
this.getSourceDeclaration().hasQualifiedName("org.springframework.http", "RequestEntity")
}
}
/** The class `org.springframework.http.ResponseEntity` or an instantiation of it. */
class SpringResponseEntity extends Class {
SpringResponseEntity() {
getSourceDeclaration()
.getErasure()
.(RefType)
.hasQualifiedName("org.springframework.http", "ResponseEntity")
this.getSourceDeclaration().hasQualifiedName("org.springframework.http", "ResponseEntity")
}
}
/** The nested class `BodyBuilder` in `org.springframework.http.ResponseEntity`. */
class SpringResponseEntityBodyBuilder extends Interface {
SpringResponseEntityBodyBuilder() {
getSourceDeclaration().getEnclosingType() = any(SpringResponseEntity sre) and
hasName("BodyBuilder")
this.getSourceDeclaration().getEnclosingType() instanceof SpringResponseEntity and
this.hasName("BodyBuilder")
}
}
/** The class `org.springframework.http.HttpHeaders`. */
class SpringHttpHeaders extends Class {
SpringHttpHeaders() { hasQualifiedName("org.springframework.http", "HttpHeaders") }
}
SpringHttpHeaders() { this.hasQualifiedName("org.springframework.http", "HttpHeaders") }
}