Skip to content

Commit 76dcc57

Browse files
authored
Merge pull request #2344 from clycly/dev
fix the configuration.xml doc
2 parents a68ba4b + 8512b69 commit 76dcc57

File tree

5 files changed

+54
-9
lines changed

5 files changed

+54
-9
lines changed

src/site/es/xdoc/configuration.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,15 +1523,22 @@ public class GenericTypeHandler<E extends MyObject> extends BaseTypeHandler<E> {
15231523
</p>
15241524
<source><![CDATA[// ExampleObjectFactory.java
15251525
public class ExampleObjectFactory extends DefaultObjectFactory {
1526-
public Object create(Class type) {
1526+
@Override
1527+
public <T> T create(Class<T> type) {
15271528
return super.create(type);
15281529
}
1529-
public Object create(Class type, List<Class> constructorArgTypes, List<Object> constructorArgs) {
1530+
1531+
@Override
1532+
public <T> T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs) {
15301533
return super.create(type, constructorArgTypes, constructorArgs);
15311534
}
1535+
1536+
@Override
15321537
public void setProperties(Properties properties) {
15331538
super.setProperties(properties);
15341539
}
1540+
1541+
@Override
15351542
public <T> boolean isCollection(Class<T> type) {
15361543
return Collection.class.isAssignableFrom(type);
15371544
}
@@ -1580,12 +1587,16 @@ public class ExampleObjectFactory extends DefaultObjectFactory {
15801587
args = {MappedStatement.class,Object.class})})
15811588
public class ExamplePlugin implements Interceptor {
15821589
private Properties properties = new Properties();
1590+
1591+
@Override
15831592
public Object intercept(Invocation invocation) throws Throwable {
15841593
// implement pre processing if need
15851594
Object returnObject = invocation.proceed();
15861595
// implement post processing if need
15871596
return returnObject;
15881597
}
1598+
1599+
@Override
15891600
public void setProperties(Properties properties) {
15901601
this.properties = properties;
15911602
}

src/site/ja/xdoc/configuration.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,15 +1555,22 @@ public class GenericTypeHandler<E extends MyObject> extends BaseTypeHandler<E> {
15551555
</p>
15561556
<source><![CDATA[// ExampleObjectFactory.java
15571557
public class ExampleObjectFactory extends DefaultObjectFactory {
1558-
public Object create(Class type) {
1558+
@Override
1559+
public <T> T create(Class<T> type) {
15591560
return super.create(type);
15601561
}
1561-
public Object create(Class type, List<Class> constructorArgTypes, List<Object> constructorArgs) {
1562+
1563+
@Override
1564+
public <T> T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs) {
15621565
return super.create(type, constructorArgTypes, constructorArgs);
15631566
}
1567+
1568+
@Override
15641569
public void setProperties(Properties properties) {
15651570
super.setProperties(properties);
15661571
}
1572+
1573+
@Override
15671574
public <T> boolean isCollection(Class<T> type) {
15681575
return Collection.class.isAssignableFrom(type);
15691576
}}
@@ -1623,12 +1630,16 @@ public class ExampleObjectFactory extends DefaultObjectFactory {
16231630
args = {MappedStatement.class,Object.class})})
16241631
public class ExamplePlugin implements Interceptor {
16251632
private Properties properties = new Properties();
1633+
1634+
@Override
16261635
public Object intercept(Invocation invocation) throws Throwable {
16271636
// implement pre processing if need
16281637
Object returnObject = invocation.proceed();
16291638
// implement post processing if need
16301639
return returnObject;
16311640
}
1641+
1642+
@Override
16321643
public void setProperties(Properties properties) {
16331644
this.properties = properties;
16341645
}

src/site/ko/xdoc/configuration.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,15 +1485,22 @@ public class GenericTypeHandler<E extends MyObject> extends BaseTypeHandler<E> {
14851485
예를들면:</p>
14861486
<source><![CDATA[// ExampleObjectFactory.java
14871487
public class ExampleObjectFactory extends DefaultObjectFactory {
1488-
public Object create(Class type) {
1488+
@Override
1489+
public <T> T create(Class<T> type) {
14891490
return super.create(type);
14901491
}
1491-
public Object create(Class type, List<Class> constructorArgTypes, List<Object> constructorArgs) {
1492+
1493+
@Override
1494+
public <T> T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs) {
14921495
return super.create(type, constructorArgTypes, constructorArgs);
14931496
}
1497+
1498+
@Override
14941499
public void setProperties(Properties properties) {
14951500
super.setProperties(properties);
14961501
}
1502+
1503+
@Override
14971504
public <T> boolean isCollection(Class<T> type) {
14981505
return Collection.class.isAssignableFrom(type);
14991506
}}
@@ -1546,12 +1553,16 @@ public class ExampleObjectFactory extends DefaultObjectFactory {
15461553
args = {MappedStatement.class,Object.class})})
15471554
public class ExamplePlugin implements Interceptor {
15481555
private Properties properties = new Properties();
1556+
1557+
@Override
15491558
public Object intercept(Invocation invocation) throws Throwable {
15501559
// implement pre processing if need
15511560
Object returnObject = invocation.proceed();
15521561
// implement post processing if need
15531562
return returnObject;
15541563
}
1564+
1565+
@Override
15551566
public void setProperties(Properties properties) {
15561567
this.properties = properties;
15571568
}

src/site/xdoc/configuration.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,8 @@ public class ExampleObjectFactory extends DefaultObjectFactory {
16841684
@Override
16851685
public <T> boolean isCollection(Class<T> type) {
16861686
return Collection.class.isAssignableFrom(type);
1687-
}}
1687+
}
1688+
}
16881689
]]></source>
16891690

16901691
<source><![CDATA[<!-- mybatis-config.xml -->

src/site/zh/xdoc/configuration.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,15 +1527,22 @@ public class GenericTypeHandler<E extends MyObject> extends BaseTypeHandler<E> {
15271527
如果想覆盖对象工厂的默认行为,可以通过创建自己的对象工厂来实现。比如:</p>
15281528
<source><![CDATA[// ExampleObjectFactory.java
15291529
public class ExampleObjectFactory extends DefaultObjectFactory {
1530-
public Object create(Class type) {
1530+
@Override
1531+
public <T> T create(Class<T> type) {
15311532
return super.create(type);
15321533
}
1533-
public Object create(Class type, List<Class> constructorArgTypes, List<Object> constructorArgs) {
1534+
1535+
@Override
1536+
public <T> T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs) {
15341537
return super.create(type, constructorArgTypes, constructorArgs);
15351538
}
1539+
1540+
@Override
15361541
public void setProperties(Properties properties) {
15371542
super.setProperties(properties);
15381543
}
1544+
1545+
@Override
15391546
public <T> boolean isCollection(Class<T> type) {
15401547
return Collection.class.isAssignableFrom(type);
15411548
}}
@@ -1587,12 +1594,16 @@ public class ExampleObjectFactory extends DefaultObjectFactory {
15871594
args = {MappedStatement.class,Object.class})})
15881595
public class ExamplePlugin implements Interceptor {
15891596
private Properties properties = new Properties();
1597+
1598+
@Override
15901599
public Object intercept(Invocation invocation) throws Throwable {
15911600
// implement pre processing if need
15921601
Object returnObject = invocation.proceed();
15931602
// implement post processing if need
15941603
return returnObject;
15951604
}
1605+
1606+
@Override
15961607
public void setProperties(Properties properties) {
15971608
this.properties = properties;
15981609
}

0 commit comments

Comments
 (0)