diff --git a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java index baf5c72..34a2054 100644 --- a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java +++ b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java @@ -123,13 +123,13 @@ String thisClass; String thisObject; String methodSignature = null; - if ((m.getModifiers() & Modifier.STATIC) != 0) { + if ((m.getModifiers() & Modifier.STATIC) != 0 && m instanceof CtMethod) { // static���\�b�h�̏ꍇ methodSignature = "\"" + modifiers + ((CtMethod)m).getReturnType().getName() + " " + m.getLongName().replace('$', '.') + "\""; // AspectJ�ł̓��\�b�h�V�O�j�`�����ł͖����N���X�̓h�b�g�ŋ�؂��� thisClass = "\"" + declaredClassName + "\""; thisObject = "\"0\""; } else if (m instanceof CtConstructor) { - // �R���X�g���N�^�̏ꍇ + // �R���X�g���N�^�̏ꍇ(�N���X�������q�̏ꍇ������) methodSignature = "\"" + modifiers + m.getLongName().replace('$', '.') + "\""; // AspectJ�ł̓��\�b�h�V�O�j�`�����ł͖����N���X�̓h�b�g�ŋ�؂��� thisClass = "\"" + declaredClassName + "\""; thisObject = "\"0\""; @@ -173,7 +173,7 @@ String returnedObject; String thisClass; String thisObject; - if ((m.getModifiers() & Modifier.STATIC) != 0) { + if ((m.getModifiers() & Modifier.STATIC) != 0 && m instanceof CtMethod) { // static���\�b�h�̏ꍇ if (!((CtMethod)m).getReturnType().isPrimitive() || ((CtMethod)m).getReturnType() == CtClass.voidType) { returnedClass = "(($_ != null)?$_.getClass().getName():\"void\")"; @@ -187,13 +187,22 @@ thisObject = "\"0\""; } } else if (m instanceof CtConstructor) { - // �R���X�g���N�^�̏ꍇ + // �R���X�g���N�^�̏ꍇ(�N���X�������q�̏ꍇ������) if (!isCallerSideInstrumentation) { - // �Ăяo����ɖ��ߍ��ޏꍇ(�ʏ�) - returnedClass = "$0.getClass().getName()"; - returnedObject = "System.identityHashCode($0)"; - thisClass = "\"" + declaredClassName + "\""; - thisObject = "System.identityHashCode($0)"; + // �Ăяo����ɖ��ߍ��ޏꍇ + if ((m.getModifiers() & Modifier.STATIC) == 0) { + // �ʏ�̃R���X�g���N�^�̏ꍇ + returnedClass = "$0.getClass().getName()"; + returnedObject = "System.identityHashCode($0)"; + thisClass = "\"" + declaredClassName + "\""; + thisObject = "System.identityHashCode($0)"; + } else { + // �N���X�������q�̏ꍇ + returnedClass = "\"void\""; + returnedObject = "\"0\""; + thisClass = "\"" + declaredClassName + "\""; + thisObject = "\"0\""; + } } else { // �ďo�����ɖ��ߍ��ޏꍇ(�W���N���X�������̓f�t�H���g�R���X�g���N�^�̌ďo���A�܂��͐e�R���X�g���N�^�̌ďo��) returnedClass = "(($_ != null)?$_.getClass().getName():$0.getClass().getName())";