-
Notifications
You must be signed in to change notification settings - Fork 46
UtMethod removal #862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UtMethod removal #862
Conversation
bbc3bd0
to
b3c3714
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good PR! There is some suggestions for a future replacement SootMethod
: we can introduce ReflectionWrapper
that will wrap ExecutableId and provide reflection methods for its and ReflectionWrapperBuilder
that will create instances of ReflectionWrappers
depending on specified implementation such as Soot or JCDB.
utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/framework/assemble/AssembleModelGenerator.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/framework/concrete/UtExecutionInstrumentation.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/framework/coverage/CoverageCalculator.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments discussed verbally
e690398
to
0f3edf8
Compare
eb24366
to
7c67a69
Compare
Description
UtMethod
withExecutableId
.Method.isStatic
,Class.isAbstract
are located in theReflectionUtil.kt
.Some context:
UtMethod
is a vestigial class which was used for passing method under test to ourTestCaseGenerator
. Now we useExecutableId
for identifying method, so it's unnecessary to have one more entity. We can simply buildExecutableId
fromjava.reflect.Method
andKCallable<*>
by calling.executableId
extension function, assuming we haveUtContext
initialized.ExecutableId
has two main inheritors:MethodId
andConstructorId
. We also have our own wrappersClassId
andFieldId
for java classes and fields respectively.Please note, that some reflection dependent parts of
FieldId
,ClassId
andExecutableId
API, e.g.MethodId.method
,ClassId.isPublic
, etc., requireUtContext
to be set. It's very implicit and to be refactored in the next PRs.Type of Change
How Has This Been Tested?
Manual Scenario
Checklist: