Puts back option to disable strict DMI

This commit is contained in:
Lukasz Lenart
2015-09-04 08:55:14 +02:00
parent ab5fb27d36
commit e4fc8528b8
4 changed files with 15 additions and 0 deletions
@@ -448,6 +448,7 @@ public class PackageConfig extends Located implements Comparable, Serializable,
public static class Builder implements InterceptorLocator {
protected PackageConfig target;
private boolean strictDMI;
public Builder(String name) {
target = new PackageConfig(name);
@@ -613,6 +614,15 @@ public class PackageConfig extends Located implements Comparable, Serializable,
return target.getAllInterceptorConfigs().get(name);
}
public Builder strictMethodInvocation(boolean strict) {
strictDMI = strict;
return this;
}
public boolean isStrictMethodInvocation() {
return strictDMI;
}
public PackageConfig build() {
embalmTarget();
PackageConfig result = target;
@@ -649,9 +649,12 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
String name = StringUtils.defaultString(packageElement.getAttribute("name"));
String namespace = StringUtils.defaultString(packageElement.getAttribute("namespace"));
boolean strictDMI = Boolean.parseBoolean(packageElement.getAttribute("strict-method-invocation"));
PackageConfig.Builder cfg = new PackageConfig.Builder(name)
.namespace(namespace)
.isAbstract(isAbstract)
.strictMethodInvocation(strictDMI)
.location(DomHelper.getLocationObject(packageElement));
if (StringUtils.isNotEmpty(StringUtils.defaultString(parent))) { // has parents, let's look it up
+1
View File
@@ -43,6 +43,7 @@
extends CDATA #IMPLIED
namespace CDATA #IMPLIED
abstract CDATA #IMPLIED
strict-method-invocation (true|false) "true"
>
<!ELEMENT result-types (result-type+)>
+1
View File
@@ -22,6 +22,7 @@
extends CDATA #IMPLIED
namespace CDATA #IMPLIED
abstract CDATA #IMPLIED
strict-method-invocation (true|false) "true"
>
<!ELEMENT result-types (result-type+)>