mv.visitEnd();
}
private void addVarAccessDelegators() throws ClassNotFoundException{
Iterator<String> keys = _subjectAnalysisDataContainer._directFieldsAccess.keySet().iterator();
ClassDescriptor subjectClassDescriptor = _subjectAnalysisDataContainer._predicateSubjectClassDescriptor;
while (keys.hasNext()) {
String nextVar = keys.next();
Type owner = _subjectAnalysisDataContainer._directFieldsAccess.get(nextVar);
ClassDescriptor ownerClassDescriptor = _subjectAnalysisDataContainer._session.getDescriptorForClass(owner.getClassName());
if(!owner.getInternalName().equals(_internalClassName)){
continue;
}
String methodNameBase = "_synthAcc$$$"+nextVar;
String methodName = methodNameBase;
int counter = 0;
while(subjectClassDescriptor.getMethodForName(methodName)!=null){
methodName = methodNameBase+counter;
counter++;
}
Field field = ownerClassDescriptor.getFieldForName(nextVar);
Type returnType = Type.getType(field.getType());
org.objectweb.asm.commons.Method method = new org.objectweb.asm.commons.Method(methodName,returnType,new Type[0]);
MethodVisitor mv = super.visitMethod(ACC_PUBLIC, methodName, method.getDescriptor(), null, null);
int fieldId = ownerClassDescriptor.getFieldIDForName(nextVar);
writeVarInitCondition(mv, fieldId, nextVar, field.getType());
writeReturn(mv, field);
_subjectAnalysisDataContainer._referringMethods.put(composeReferringMethodId(methodName, method.getDescriptor()), fieldId);
_subjectAnalysisDataContainer._syntheticReferringMethods.put(nextVar, method);
}