Skip to content

Commit 1c62556

Browse files
committed
commit
commit
1 parent 625cb72 commit 1c62556

File tree

632 files changed

+9999
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

632 files changed

+9999
-137
lines changed

.metadata/.log

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,3 +2968,151 @@ org.eclipse.equinox.p2.core.ProvisionException: No repository found at file:/E:/
29682968

29692969
!ENTRY org.eclipse.ui 2 2 2017-12-17 22:00:34.342
29702970
!MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation)
2971+
!SESSION 2017-12-18 09:45:23.380 -----------------------------------------------
2972+
eclipse.buildId=M20130204-1200
2973+
java.version=1.8.0_66
2974+
java.vendor=Oracle Corporation
2975+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
2976+
Framework arguments: -product com.android.ide.eclipse.adt.package.adtproduct
2977+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product com.android.ide.eclipse.adt.package.adtproduct
2978+
2979+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-18 09:46:22.380
2980+
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
2981+
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
2982+
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
2983+
this system level configuration. The Git installation location can be configured on the
2984+
Team > Git > Configuration preference page's 'System Settings' tab.
2985+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
2986+
2987+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-18 09:46:22.380
2988+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
2989+
user global configuration and to define the default location to store repositories: 'C:\Users\admin'. If this is
2990+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
2991+
EGit might behave differently since they see different configuration options.
2992+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
2993+
2994+
!ENTRY org.eclipse.ui 2 2 2017-12-18 09:54:56.238
2995+
!MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation)
2996+
!SESSION 2017-12-19 10:24:16.239 -----------------------------------------------
2997+
eclipse.buildId=M20130204-1200
2998+
java.version=1.8.0_66
2999+
java.vendor=Oracle Corporation
3000+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
3001+
Framework arguments: -product com.android.ide.eclipse.adt.package.adtproduct
3002+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product com.android.ide.eclipse.adt.package.adtproduct
3003+
3004+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-19 10:24:57.630
3005+
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
3006+
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
3007+
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
3008+
this system level configuration. The Git installation location can be configured on the
3009+
Team > Git > Configuration preference page's 'System Settings' tab.
3010+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
3011+
3012+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-19 10:24:57.661
3013+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
3014+
user global configuration and to define the default location to store repositories: 'C:\Users\admin'. If this is
3015+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
3016+
EGit might behave differently since they see different configuration options.
3017+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
3018+
3019+
!ENTRY org.eclipse.ui 2 2 2017-12-19 10:27:03.502
3020+
!MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation)
3021+
3022+
!ENTRY org.eclipse.core.jobs 4 2 2017-12-19 10:28:17.767
3023+
!MESSAGE An internal error occurred during: "Launching Testable.test".
3024+
!STACK 0
3025+
java.lang.NullPointerException
3026+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localURL(JUnitLaunchConfigurationDelegate.java:420)
3027+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.entryString(JUnitLaunchConfigurationDelegate.java:409)
3028+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.addEntry(JUnitLaunchConfigurationDelegate.java:396)
3029+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localizeClasspath(JUnitLaunchConfigurationDelegate.java:387)
3030+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getClasspath(JUnitLaunchConfigurationDelegate.java:364)
3031+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(JUnitLaunchConfigurationDelegate.java:147)
3032+
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
3033+
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
3034+
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
3035+
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
3036+
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
3037+
3038+
!ENTRY org.eclipse.core.jobs 4 2 2017-12-19 10:29:53.944
3039+
!MESSAGE An internal error occurred during: "Launching Testable.test".
3040+
!STACK 0
3041+
java.lang.NullPointerException
3042+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localURL(JUnitLaunchConfigurationDelegate.java:420)
3043+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.entryString(JUnitLaunchConfigurationDelegate.java:409)
3044+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.addEntry(JUnitLaunchConfigurationDelegate.java:396)
3045+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localizeClasspath(JUnitLaunchConfigurationDelegate.java:387)
3046+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getClasspath(JUnitLaunchConfigurationDelegate.java:364)
3047+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(JUnitLaunchConfigurationDelegate.java:147)
3048+
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
3049+
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
3050+
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
3051+
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
3052+
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
3053+
3054+
!ENTRY org.eclipse.core.jobs 4 2 2017-12-19 10:30:01.927
3055+
!MESSAGE An internal error occurred during: "Launching Testable.test".
3056+
!STACK 0
3057+
java.lang.NullPointerException
3058+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localURL(JUnitLaunchConfigurationDelegate.java:420)
3059+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.entryString(JUnitLaunchConfigurationDelegate.java:409)
3060+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.addEntry(JUnitLaunchConfigurationDelegate.java:396)
3061+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localizeClasspath(JUnitLaunchConfigurationDelegate.java:387)
3062+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getClasspath(JUnitLaunchConfigurationDelegate.java:364)
3063+
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(JUnitLaunchConfigurationDelegate.java:147)
3064+
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
3065+
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
3066+
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
3067+
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
3068+
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
3069+
!SESSION 2017-12-19 18:48:55.650 -----------------------------------------------
3070+
eclipse.buildId=M20130204-1200
3071+
java.version=1.8.0_66
3072+
java.vendor=Oracle Corporation
3073+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
3074+
Framework arguments: -product com.android.ide.eclipse.adt.package.adtproduct
3075+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product com.android.ide.eclipse.adt.package.adtproduct
3076+
3077+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-19 18:49:37.375
3078+
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
3079+
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
3080+
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
3081+
this system level configuration. The Git installation location can be configured on the
3082+
Team > Git > Configuration preference page's 'System Settings' tab.
3083+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
3084+
3085+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-19 18:49:37.411
3086+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
3087+
user global configuration and to define the default location to store repositories: 'C:\Users\admin'. If this is
3088+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
3089+
EGit might behave differently since they see different configuration options.
3090+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
3091+
3092+
!ENTRY org.eclipse.ui 2 2 2017-12-19 18:50:07.413
3093+
!MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation)
3094+
!SESSION 2017-12-19 21:07:21.863 -----------------------------------------------
3095+
eclipse.buildId=M20130204-1200
3096+
java.version=1.8.0_66
3097+
java.vendor=Oracle Corporation
3098+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
3099+
Framework arguments: -product com.android.ide.eclipse.adt.package.adtproduct
3100+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product com.android.ide.eclipse.adt.package.adtproduct
3101+
3102+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-19 21:08:03.113
3103+
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
3104+
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
3105+
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
3106+
this system level configuration. The Git installation location can be configured on the
3107+
Team > Git > Configuration preference page's 'System Settings' tab.
3108+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
3109+
3110+
!ENTRY org.eclipse.egit.ui 2 0 2017-12-19 21:08:03.160
3111+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
3112+
user global configuration and to define the default location to store repositories: 'C:\Users\admin'. If this is
3113+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
3114+
EGit might behave differently since they see different configuration options.
3115+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
3116+
3117+
!ENTRY org.eclipse.ui 2 2 2017-12-19 21:10:54.746
3118+
!MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation)

.metadata/.plugins/org.eclipse.cdt.core/.log

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@
1212
*** SESSION 12月 16, 2017 10:36:21.33 -------------------------------------------
1313
*** SESSION 12月 17, 2017 09:28:19.35 -------------------------------------------
1414
*** SESSION 12月 17, 2017 21:46:21.99 -------------------------------------------
15+
*** SESSION 12月 18, 2017 09:46:34.04 -------------------------------------------
16+
*** SESSION 12月 19, 2017 10:24:58.72 -------------------------------------------
17+
*** SESSION 12月 19, 2017 18:49:37.100 ------------------------------------------
18+
*** SESSION 12月 19, 2017 21:08:04.22 -------------------------------------------
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package chapter20.one;
2+
3+
import org.junit.Test;
4+
5+
public class Testable {
6+
7+
public static void execute(){
8+
System.out.println("Executing");
9+
}
10+
@Test
11+
void test(){
12+
execute();
13+
}
14+
public static void main(String[] args) {
15+
execute();
16+
}
17+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package chapter20.two;
2+
3+
import java.io.ObjectInputStream.GetField;
4+
import java.lang.annotation.*;
5+
import java.lang.reflect.*;
6+
import java.util.*;
7+
8+
public class TableCreator {
9+
10+
public static void main(String[] args) throws Exception {
11+
if(args.length<1){
12+
System.out.println("arguments:annotated classes");
13+
System.exit(0);
14+
}
15+
for(String className:args){
16+
Class<?> cl=Class.forName(className);
17+
DBTable dbTable=cl.getAnnotation(DBTable.class);
18+
if(dbTable==null){
19+
System.out.println("No DBTable in class :"+className);
20+
continue;
21+
}
22+
String tableName=dbTable.name(); //�õ�table�ı���
23+
if(tableName.length()<1){ //ֻ�����˸�ע��һ��
24+
tableName=cl.getName().toUpperCase();
25+
}
26+
List<String> columnDefs=new ArrayList<String>();//�洢�ж�����б�
27+
for(Field field:cl.getDeclaredFields()){
28+
String columnName=null;
29+
Annotation[] anns=field.getDeclaredAnnotations(); //�õ�ijһ����ע�������
30+
if(anns.length<1){
31+
continue;
32+
}
33+
if(anns[0] instanceof SQLInteger){ //�ж�ע���Ƿ�ΪSQLInteger�������͵�
34+
SQLInteger sInt=(SQLInteger) anns[0];
35+
//ʹ���������������û��ָ����
36+
if(sInt.name().length()<1){
37+
columnName=field.getName().toUpperCase();
38+
}else{
39+
columnName=sInt.name();
40+
}
41+
columnDefs.add(columnName+"INT"+getConstraints(sInt.constraints()));
42+
}
43+
if(anns[0] instanceof SQLString){ //�ж�ע���Ƿ�ΪSQLInteger�������͵�
44+
SQLString sString=(SQLString) anns[0];
45+
//ʹ���������������û��ָ����
46+
if(sString.name().length()<1){
47+
columnName=field.getName().toUpperCase();
48+
}else{
49+
columnName=sString.name();
50+
}
51+
columnDefs.add(columnName+"VARCHAR("+sString.value()+")"+getConstraints(sString.constraints()));
52+
}
53+
StringBuilder createCommand=new StringBuilder("CREATE TABLE "+tableName+"(");
54+
for(String columnDef:columnDefs){
55+
createCommand.append("\n "+columnDef+",");
56+
}
57+
//�Ƴ�ĩβ������
58+
String tableCreate=createCommand.substring(0, createCommand.length()-1)+");";
59+
System.out.println("Table Creation Sql for "+className+"is :\n"+tableCreate);
60+
}
61+
}
62+
}
63+
64+
private static String getConstraints(Constraints constraints) {
65+
// TODO Auto-generated method stub
66+
String cons="";
67+
if(!constraints.allowNull()){
68+
cons+=" NOT NULL ";//������constraints�ж����Լ�����ж�ȡ��
69+
}
70+
if(constraints.primaryKey()){
71+
cons+=" PRIMARY KEY ";
72+
}
73+
if(constraints.unique()){
74+
cons+=" UNIQUE";
75+
}
76+
77+
return cons;
78+
}
79+
}

.metadata/.plugins/org.eclipse.core.resources/.history/10/802786949de30017133f86625ce3c5bd

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package chapter20.three;
2+
3+
public class InterfaceExtractorProcessorFactory {
4+
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package chapter19.eleven;
2+
3+
public class Rock implements Item{
4+
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package chapter19.six;
2+
3+
import java.util.Random;
4+
5+
public class Enums {
6+
7+
private static Random random=new Random(47);
8+
public static <T extends Enum<T>> T random(Class<T> ec){
9+
return random(ec.getEnumConstants());
10+
}
11+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package chapter19.ten;
2+
3+
public class CarWash {
4+
5+
public enum Cycle{
6+
UNDERBODY{
7+
void action(){
8+
System.out.println("Spraying the underbody");
9+
}
10+
},
11+
WHEELWASH{
12+
void action(){
13+
System.out.println("Washing the wheels");
14+
}
15+
},
16+
PREWASH{
17+
void action(){
18+
System.out.println("Loosening the dirt");
19+
}
20+
}
21+
}
22+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package chapter19.ten;
2+
3+
import java.util.Iterator;
4+
5+
import chapter19.six.Enums;
6+
7+
public class Mail {
8+
9+
enum GeneralDelivery{
10+
YES,NO1,NO2,NO3,NO4,NO5
11+
}
12+
enum Scannability{
13+
UNSCANNABLE,YES1,YES2,YES3,YES4
14+
}
15+
enum Readability{
16+
ILLEGIBLE,YES1,YES2,YES3,YES4
17+
}
18+
enum Address{
19+
INCORRECT,OK1,OK2,OK3,OK4,OK5,OK6
20+
}
21+
enum ReturnAddress{
22+
MISSING,OK1,OK2,OK3,OK4,OK5
23+
}
24+
GeneralDelivery generalDelivery;
25+
Scannability scannability;
26+
Address address;
27+
Readability readability;
28+
ReturnAddress returnAddress;
29+
30+
static long counter=0;
31+
long id=counter++;
32+
@Override
33+
public String toString() {
34+
// TODO Auto-generated method stub
35+
return "Mail"+id;
36+
}
37+
public String details(){
38+
return toString()+"general deliver"+generalDelivery+scannability;
39+
}
40+
41+
public static Mail randomMail(){
42+
Mail mail=new Mail();
43+
mail.generalDelivery=Enums.random(GeneralDelivery.class);
44+
mail.scannability=Enums.random(Scannability.class);
45+
return mail;
46+
}
47+
48+
public static Iterable<Mail> generator(final int count){
49+
return new Iterable<Mail>() {
50+
int n=count;
51+
public Iterator<Mail> iterator() {
52+
// TODO Auto-generated method stub
53+
return null;
54+
}
55+
};
56+
}
57+
}

0 commit comments

Comments
 (0)