forked from JavaTX/JavaCompilerCore
21.05.15 - Konferenz Call; Class.java GenByteCode Methode - Zusatz:
Rückgabewert sollte ByteCode sein; Entsprechend muss ähnlich JavaCodeResult Klasse eine ByteCodeResult Klasse erstellt werden...
This commit is contained in:
parent
4833bfd09b
commit
2b62ac43e6
21
.classpath
21
.classpath
@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry excluding=".classpath|.cvsignore|.externalToolBuilders/|.project|.settings/|Papers/|bin/|doc/|examples/|lib/|notizen/|src/|test/|tools/" including="log4j.xml" kind="src" path=""/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
|
||||
<classpathentry kind="lib" path="lib/junit-4.0.jar" sourcepath="/home/janulrich/.m2/repository/junit/junit/4.0/junit-4.0-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/cloning.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry excluding=".classpath|.cvsignore|.externalToolBuilders/|.project|.settings/|Papers/|bin/|doc/|examples/|lib/|notizen/|src/|test/|tools/" including="log4j.xml" kind="src" path=""/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||
<classpathentry kind="lib" path="lib/junit-4.0.jar" sourcepath="/home/janulrich/.m2/repository/junit/junit/4.0/junit-4.0-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/cloning.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/fikus/Desktop/bcel-5.2/bcel-5.2.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -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
|
||||
|
@ -1,35 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
|
||||
|
||||
<appender name="CONSOLE" class="de.dhbwstuttgart.logger.ConsoleAppender">
|
||||
<param name="Target" value="System.out"/>
|
||||
|
||||
<layout class="de.dhbwstuttgart.logger.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-15C{1} %-5p [%-9c] %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="codegen">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<logger name="parser">
|
||||
<level value="OFF"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<logger name="inference">
|
||||
<level value="WARN"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
|
||||
<logger name="bytecode">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
</log4j:configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
|
||||
|
||||
<appender name="CONSOLE" class="de.dhbwstuttgart.logger.ConsoleAppender">
|
||||
<param name="Target" value="System.out"/>
|
||||
|
||||
<layout class="de.dhbwstuttgart.logger.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-15C{1} %-5p [%-9c] %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="codegen">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<logger name="parser">
|
||||
<level value="OFF"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<logger name="inference">
|
||||
<level value="WARN"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
|
||||
<logger name="bytecode">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
</log4j:configuration>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
|
||||
|
||||
<appender name="CONSOLE" class="de.dhbwstuttgart.logger.ConsoleAppender">
|
||||
<param name="Target" value="System.out"/>
|
||||
|
||||
<layout class="de.dhbwstuttgart.logger.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-15C{1} %-5p [%-9c] %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="trtest">
|
||||
<level value="DEBUG"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<logger name="funcTest">
|
||||
<level value="DEBUG"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
</log4j:configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
|
||||
|
||||
<appender name="CONSOLE" class="de.dhbwstuttgart.logger.ConsoleAppender">
|
||||
<param name="Target" value="System.out"/>
|
||||
|
||||
<layout class="de.dhbwstuttgart.logger.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-15C{1} %-5p [%-9c] %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="trtest">
|
||||
<level value="DEBUG"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<logger name="funcTest">
|
||||
<level value="DEBUG"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
</log4j:configuration>
|
||||
|
@ -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<Type> superif = new Menge<Type>();
|
||||
|
||||
|
@ -345,8 +345,7 @@ public void istParameterOK( Menge Parameter, Menge<Class> KlassenVektor )
|
||||
return ret.attach("}\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user