
com.netflix.nebula.lint.rule.dependency.MethodReference.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-lint-plugin Show documentation
Show all versions of gradle-lint-plugin Show documentation
Pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts
package com.netflix.nebula.lint.rule.dependency
import groovy.transform.CompileStatic
@CompileStatic
class MethodReference {
String methodName
String owner
String methodDesc
int line
boolean isInterface
OpCode opCode
Collection artifacts
MethodReference(String methodName, String owner, String methodDesc, int line, boolean isInterface, int code, Collection artifacts) {
this.methodName = methodName
this.owner = owner
this.methodDesc = methodDesc
this.line = line
this.isInterface = isInterface
this.opCode = OpCode.findByCode(code)
this.artifacts = artifacts
}
@Override
String toString() {
return "methodName: $methodName - owner: $owner - methodDesc: $methodDesc - line: $line - isInterface: $isInterface - opCode: ${opCode.name()}"
}
enum OpCode {
INVOKEVIRTUAL(182),
INVOKESPECIAL(183),
INVOKESTATIC(184),
INVOKEINTERFACE(185),
INVOKEDYNAMIC(186)
int code
OpCode(int code) {
this.code = code
}
static OpCode findByCode(int code) {
values().find { it.code == code }
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy