first issue
This commit is contained in:
parent
9dc4db3283
commit
8983189af6
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
@ -1,16 +1,11 @@
|
|||
# ---> Java
|
||||
# Compiled class file
|
||||
# Java
|
||||
target/
|
||||
bin/
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
|
|
@ -20,7 +15,5 @@
|
|||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
# do NOT ignores
|
||||
!lib/*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>JavaReflection</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
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
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package fields;
|
||||
|
||||
public class ReflecMmk {
|
||||
private String projectNumber;
|
||||
private int userId;
|
||||
private boolean flag;
|
||||
private String definition;
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package fields;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class TestReflectionMain {
|
||||
|
||||
public static void main(String[] args) {
|
||||
//ReflecMmk refClass = ReflecMmk.class.newInstance();
|
||||
|
||||
//Field[] refFields = refClass.getDeclaredFields();
|
||||
|
||||
HashMap<String, String> importParam = new HashMap<String, String>();
|
||||
importParam.put("PROJECT_NUMBER", "282000");
|
||||
importParam.put("definition", "test def.");
|
||||
importParam.put("Type", "test type");
|
||||
|
||||
|
||||
|
||||
System.out.println("\nEnd of app");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package mmk.test;
|
||||
|
||||
public class ReflecMmk {
|
||||
private String projectNumber;
|
||||
private int userId;
|
||||
private boolean flag;
|
||||
private String definition;
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package mmk.test;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class TestReflectionMain {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Class<ReflecMmk> refClass = ReflecMmk.class;
|
||||
|
||||
Field[] refFields = refClass.getDeclaredFields();
|
||||
|
||||
HashMap<String, String> importParam = new HashMap<String, String>();
|
||||
importParam.put("PROJECT_NUMBER", "282000");
|
||||
importParam.put("definition", "test def.");
|
||||
importParam.put("Type", "test type");
|
||||
|
||||
|
||||
|
||||
System.out.println("\nEnd of app");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue