From ba81e2e4642841f62e6329241b41c46eed7c50b6 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 13 Feb 1999 18:38:46 +0000 Subject: [PATCH] isThis added git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@281 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/PutFieldOperator.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/jode/jode/expr/PutFieldOperator.java b/jode/jode/expr/PutFieldOperator.java index 4c7fa72..c37bb59 100644 --- a/jode/jode/expr/PutFieldOperator.java +++ b/jode/jode/expr/PutFieldOperator.java @@ -45,12 +45,22 @@ public class PutFieldOperator extends StoreInstruction { } public boolean isSynthetic() { - if (!classType.equals(Type.tClass(codeAnalyzer.getClazz().getName()))) + if (!isThis()) return false; return codeAnalyzer.getClassAnalyzer() .getField(fieldName, fieldType).isSynthetic(); } + /** + * Checks, whether this is a call of a method from this class. + * @XXX check, if this class implements the method and if not + * allow super class + */ + public boolean isThis() { + return (classType.equals(Type.tClass(codeAnalyzer.getClazz(). + getName()))); + } + public String getFieldName() { return fieldName; }