modified: ../../../../main/java/de/dhbwstuttgart/bytecode/TPHExtractor.java
This commit is contained in:
parent
5980f1c7b8
commit
5b7fec660d
@ -62,7 +62,7 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
/*
|
||||
* ordnet den Methodennamen ihre jeweiligen Methodenrespraesentationen der abstrakte Syntax in der jeweiligen aktuellen Klasse zu
|
||||
*/
|
||||
public HashMap<String,Expression> nameToField;
|
||||
public HashMap<String,RefTypeOrTPHOrWildcardOrGeneric> nameToField;
|
||||
public final HashMap<String, Boolean> allTPHS = new HashMap<>();
|
||||
public final List<String> tphsClass = new ArrayList<>();
|
||||
MethodAndTPH methodAndTph;
|
||||
@ -233,7 +233,8 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
.stream()
|
||||
.filter(s -> s instanceof Assign)
|
||||
.forEach(as ->
|
||||
this.nameToField.put(((AssignToField)(((Assign)as).lefSide)).field.fieldVarName, ((Assign)as).rightSide));
|
||||
this.nameToField.put(((AssignToField)(((Assign)as).lefSide)).field.fieldVarName,
|
||||
((AssignToField)(((Assign)as).lefSide)).getType())) ;
|
||||
}
|
||||
|
||||
this.nameToMeth = new HashMap<>();
|
||||
@ -287,14 +288,19 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
|| (methodCall.name.equals("apply") &&
|
||||
(methodCall.receiver instanceof ExpressionReceiver) &&
|
||||
(((ExpressionReceiver)methodCall.receiver).expr instanceof FieldVar) &&
|
||||
nameToField.keySet().contains(fieldOrMethName=((FieldVar)((ExpressionReceiver)methodCall.receiver).expr).fieldVarName)
|
||||
nameToField.keySet().contains(fieldOrMethName = ((FieldVar)((ExpressionReceiver)methodCall.receiver).expr).fieldVarName)
|
||||
)
|
||||
)
|
||||
{
|
||||
Iterator<FormalParameter> paraIt =
|
||||
Iterator<RefTypeOrTPHOrWildcardOrGeneric> paraIt =
|
||||
methodCall.name.equals("apply")
|
||||
? ((LambdaExpression)nameToField.get(fieldOrMethName)).params.iterator()
|
||||
: nameToMeth.get(methodCall.name).getParameterList().iterator();
|
||||
? (FuNTYPE)(resultSet.resolveType((nameToField.get(fieldOrMethName))).resolvedType).GETARGTYPES
|
||||
: nameToMeth.get(methodCall.name)
|
||||
.getParameterList()
|
||||
.getFormalparalist()
|
||||
.stream()
|
||||
.map(p -> p.getType())
|
||||
.iterator();
|
||||
methodCall.getArgumentList()
|
||||
.getArguments()
|
||||
.forEach(x -> {
|
||||
|
Loading…
Reference in New Issue
Block a user