From 2b62ac43e64634f195860f4b70c59809d764f817 Mon Sep 17 00:00:00 2001 From: "Fikus, Evelyn (WWI2012D)" Date: Thu, 21 May 2015 17:10:04 +0200 Subject: [PATCH] =?UTF-8?q?21.05.15=20-=20Konferenz=20Call;=20Class.java?= =?UTF-8?q?=20GenByteCode=20Methode=20-=20Zusatz:=20R=C3=BCckgabewert=20so?= =?UTF-8?q?llte=20ByteCode=20sein;=20Entsprechend=20muss=20=C3=A4hnlich=20?= =?UTF-8?q?JavaCodeResult=20Klasse=20eine=20ByteCodeResult=20Klasse=20erst?= =?UTF-8?q?ellt=20werden...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .classpath | 21 +++--- .settings/org.eclipse.jdt.core.prefs | 26 +++---- bin/log4j.xml | 70 +++++++++---------- bin/log4jTesting.xml | 48 ++++++------- src/de/dhbwstuttgart/syntaxtree/Class.java | 17 ++++- .../dhbwstuttgart/syntaxtree/ClassBody.java | 3 +- 6 files changed, 100 insertions(+), 85 deletions(-) diff --git a/.classpath b/.classpath index 45b378eff..17feec478 100755 --- a/.classpath +++ b/.classpath @@ -1,10 +1,11 @@ - - - - - - - - - - + + + + + + + + + + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 2e8ab188d..f307ce3c9 100755 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,13 +1,13 @@ -eclipse.preferences.version=1 -instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +eclipse.preferences.version=1 +instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bin/log4j.xml b/bin/log4j.xml index 64e7c5dbd..f36fb342a 100755 --- a/bin/log4j.xml +++ b/bin/log4j.xml @@ -1,35 +1,35 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/log4jTesting.xml b/bin/log4jTesting.xml index dc30c2453..ef8492188 100755 --- a/bin/log4jTesting.xml +++ b/bin/log4jTesting.xml @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 09d447975..2858dc9b3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -7,6 +7,9 @@ import java.util.Collection; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; + +import org.apache.bcel.generic.ClassGen; + import de.dhbwstuttgart.typeinference.Menge; import de.dhbwstuttgart.logger.Logger; @@ -33,7 +36,10 @@ import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; - +import org.apache.bcel.generic.*; +import org.apache.bcel.classfile.*; +import org.apache.bcel.*; +import java.io.*; // ino.class.Class.23010.declaration public class Class extends GTVDeclarationContext implements AClassOrInterface, IItemWithOffset, Generic, GenericTypeInsertable @@ -49,6 +55,15 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I protected UsedId pkgName; protected Modifiers modifiers; protected String name; + /* private ClassGen _cg; + + public ClassGen genByteCode() { + ByteCodeResult bc = new ByteCodeResult(); + _cg = new ClassGen(pkgName.get_Name() + "/" + name, superClass.get_Name(), name + ".java", Constants.ACC_PUBLIC , new String[] { }); + //_cg zurückgeben + bc.append(BCELByteCodeOutput); + return _cg; + }*/ private Menge superif = new Menge(); diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java index cbac8f9f8..1c96052ff 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -345,8 +345,7 @@ public void istParameterOK( Menge Parameter, Menge KlassenVektor ) return ret.attach("}\n"); } - - + }