Skip to content

Commit

Permalink
Removed dead method and minor cleanup (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
garethahealy authored Jun 9, 2018
1 parent f67638b commit 213d0a7
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import com.github.dozermapper.core.config.BeanContainer;
import com.github.dozermapper.core.el.ELEngine;

/**
* {@inheritDoc}
*/
public class ELAllowedExceptionsDefinition extends AllowedExceptionsDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

import org.apache.commons.lang3.StringUtils;

/**
* {@inheritDoc}
*/
public class ELClassDefinition extends ClassDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

import org.apache.commons.lang3.StringUtils;

/**
* {@inheritDoc}
*/
public class ELConfigurationDefinition extends ConfigurationDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

import org.apache.commons.lang3.StringUtils;

/**
* {@inheritDoc}
*/
public class ELConverterTypeDefinition extends ConverterTypeDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import com.github.dozermapper.core.classmap.CopyByReference;
import com.github.dozermapper.core.el.ELEngine;

/**
* {@inheritDoc}
*/
public class ELCopyByReferencesDefinition extends CopyByReferencesDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import com.github.dozermapper.core.builder.model.jaxb.CustomConvertersDefinition;
import com.github.dozermapper.core.el.ELEngine;

/**
* {@inheritDoc}
*/
public class ELCustomConvertersDefinition extends CustomConvertersDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.github.dozermapper.core.builder.model.elengine;

import com.github.dozermapper.core.builder.model.jaxb.FieldDefinition;
import com.github.dozermapper.core.builder.model.jaxb.FieldExcludeDefinition;
import com.github.dozermapper.core.builder.model.jaxb.MappingDefinition;
import com.github.dozermapper.core.classmap.ClassMap;
import com.github.dozermapper.core.config.BeanContainer;
Expand All @@ -27,12 +26,15 @@

import org.apache.commons.lang3.StringUtils;

/**
* {@inheritDoc}
*/
public class ELFieldDefinition extends FieldDefinition {

private final ELEngine elEngine;

public ELFieldDefinition(ELEngine elEngine, FieldDefinition copy) {
this(elEngine, null, null);
this(elEngine, (MappingDefinition)null);

if (copy != null) {
this.a = copy.getA();
Expand All @@ -52,8 +54,8 @@ public ELFieldDefinition(ELEngine elEngine, FieldDefinition copy) {
}
}

public ELFieldDefinition(ELEngine elEngine, MappingDefinition parent, FieldExcludeDefinition fieldExcludeParent) {
super(parent, fieldExcludeParent);
public ELFieldDefinition(ELEngine elEngine, MappingDefinition parent) {
super(parent);

this.elEngine = elEngine;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

import org.apache.commons.lang3.StringUtils;

/**
* {@inheritDoc}
*/
public class ELMappingDefinition extends MappingDefinition {

private final ELEngine elEngine;
Expand Down Expand Up @@ -76,7 +79,7 @@ public FieldDefinition withField() {
setFields(new ArrayList<>());
}

ELFieldDefinition field = new ELFieldDefinition(elEngine, this, null);
ELFieldDefinition field = new ELFieldDefinition(elEngine, this);
getFields().add(field);

return field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import com.github.dozermapper.core.builder.model.jaxb.MappingsDefinition;
import com.github.dozermapper.core.el.ELEngine;

/**
* {@inheritDoc}
*/
public class ELMappingsDefinition extends MappingsDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

import org.apache.commons.lang3.StringUtils;

/**
* {@inheritDoc}
*/
public class ELVariableDefinition extends VariableDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import com.github.dozermapper.core.builder.model.jaxb.VariablesDefinition;
import com.github.dozermapper.core.el.ELEngine;

/**
* {@inheritDoc}
*/
public class ELVariablesDefinition extends VariablesDefinition {

private final ELEngine elEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ public class FieldDefinition {
protected String customConverterParam;

public FieldDefinition() {
this(null, null);
this(null);
}

public FieldDefinition(MappingDefinition parentMappingDefinition, FieldExcludeDefinition parentFieldExclude) {
public FieldDefinition(MappingDefinition parentMappingDefinition) {
this.parentMappingDefinition = parentMappingDefinition;
this.parentFieldExclude = parentFieldExclude;
this.parentFieldExclude = null;

}

Expand Down Expand Up @@ -230,10 +230,6 @@ public FieldDefinition withCustomConverterParam(String customConverterParam) {
return this;
}

public FieldExcludeDefinition endFieldExclude() {
return parentFieldExclude;
}

public MappingDefinition end() {
return parentMappingDefinition;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public FieldDefinition withField() {
setFields(new ArrayList<>());
}

FieldDefinition field = new FieldDefinition(this, null);
FieldDefinition field = new FieldDefinition(this);
getFields().add(field);

return field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected void configure() {
.withWildcardCaseInsensitive(false)
.withMapEmptyString(true)
.withDateFormat("MM/dd/yyyy HH:mm")
.withRelationshipType(Relationship.CUMULATIVE)
.withRelationshipType(Relationship.fromValue("cumulative"))
.end();
// @formatter:on

Expand All @@ -97,7 +97,7 @@ protected void configure() {
.withMapEmptyString(true)
.withDateFormat("MM/dd/yyyy HH:mm")
.withMapId("A")
.withType(Type.ONE_WAY)
.withType(Type.fromValue("one-way"))
.withBeanFactory(JAXBBeanFactory.class.getName())
.withRelationshipType(Relationship.CUMULATIVE)
.withClassA()
Expand Down Expand Up @@ -133,7 +133,7 @@ protected void configure() {
.withMapSetMethod("put")
.withDateFormat("MM/dd/yyyy HH:mm")
.withKey("id")
.withType(FieldType.GENERIC)
.withType(FieldType.fromValue("generic"))
.withSetMethod("set")
.withGetMethod("get")
.end()
Expand All @@ -149,6 +149,7 @@ protected void configure() {
.withSetMethod("set")
.withGetMethod("get")
.end()
.withType(Type.ONE_WAY)
.end()
.withField()
.withCopyByReference(true)
Expand Down

0 comments on commit 213d0a7

Please sign in to comment.