@@ -43,13 +43,13 @@ import java.util.IdentityHashMap
43
43
44
44
/* *
45
45
* Creates [UtAssembleModel] from any [UtModel] or it's inner models if possible
46
- * during generation test for [packageName ].
46
+ tmp * during generation test for [basePackageName ].
47
47
*
48
48
* Needs utContext be set and Soot be initialized.
49
49
*
50
50
* Note: Caches class related information, can be reused if classes don't change.
51
51
*/
52
- class AssembleModelGenerator (private val packageName : String ) {
52
+ class AssembleModelGenerator (private val basePackageName : String ) {
53
53
54
54
// Instantiated models are stored to avoid cyclic references during reference graph analysis
55
55
private val instantiatedModels: IdentityHashMap <UtModel , UtReferenceModel > =
@@ -256,7 +256,7 @@ class AssembleModelGenerator(private val packageName: String) {
256
256
if (fieldId.isFinal) {
257
257
throw AssembleException (" Final field $fieldId can't be set in an object of the class $classId " )
258
258
}
259
- if (! fieldId.type.isAccessibleFrom(packageName )) {
259
+ if (! fieldId.type.isAccessibleFrom(basePackageName )) {
260
260
throw AssembleException (
261
261
" Field $fieldId can't be set in an object of the class $classId because its type is inaccessible"
262
262
)
@@ -398,10 +398,10 @@ class AssembleModelGenerator(private val packageName: String) {
398
398
}
399
399
400
400
private val ClassId .isVisible : Boolean
401
- get() = this .isPublic || ! this .isPrivate && this .packageName.startsWith(this @AssembleModelGenerator.packageName )
401
+ get() = this .isPublic || ! this .isPrivate && this .packageName.startsWith(basePackageName )
402
402
403
403
private val Constructor <* >.isVisible : Boolean
404
- get() = this .isPublic || ! this .isPrivate && this .declaringClass.packageName.startsWith(packageName )
404
+ get() = this .isPublic || ! this .isPrivate && this .declaringClass.packageName.startsWith(basePackageName )
405
405
406
406
/* *
407
407
* Creates setter or direct setter call to set a field.
0 commit comments