Skip to content

Commit

Permalink
pom modified and some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
avurro committed Jul 31, 2015
1 parent ccb8ae4 commit f358dab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions JMapper Framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<artifactId>jmapper-core</artifactId>
<packaging>jar</packaging>
<name>JMapper Framework</name>
<version>1.3.3.1</version>
<version>1.4.0</version>

<description>
JMapper Framework is a java bean mapper based on javassist that exposes
JMapper Framework is a java bean mapper based on javassist. JMapper exposes
interesting features as relational mapping, dynamic conversions and more
</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,31 @@

import static com.googlecode.jmapper.util.AutoBoxing.boxingOperations;
import static com.googlecode.jmapper.util.AutoBoxing.unBoxingOperations;
import static com.googlecode.jmapper.util.GeneralUtility.*;

import static com.googlecode.jmapper.util.FilesManager.isPath;
import static com.googlecode.jmapper.util.GeneralUtility.collectionIsAssignableFrom;
import static com.googlecode.jmapper.util.GeneralUtility.enrichList;
import static com.googlecode.jmapper.util.GeneralUtility.getMethod;
import static com.googlecode.jmapper.util.GeneralUtility.isAccessModifier;
import static com.googlecode.jmapper.util.GeneralUtility.isBoolean;
import static com.googlecode.jmapper.util.GeneralUtility.isEmpty;
import static com.googlecode.jmapper.util.GeneralUtility.isNull;
import static com.googlecode.jmapper.util.GeneralUtility.mGet;
import static com.googlecode.jmapper.util.GeneralUtility.mSet;
import static com.googlecode.jmapper.util.GeneralUtility.mapIsAssignableFrom;
import static com.googlecode.jmapper.util.GeneralUtility.toList;
import static com.googlecode.jmapper.util.GeneralUtility.write;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Random;

import com.googlecode.jmapper.annotations.Annotation;
import com.googlecode.jmapper.config.Constants;
import com.googlecode.jmapper.config.Error;
import com.googlecode.jmapper.enums.ChooseConfig;
import com.googlecode.jmapper.operations.beans.MappedField;
import com.googlecode.jmapper.xml.XML;

import static com.googlecode.jmapper.util.FilesManager.isPath;
/**
* Utility class that allows you to manage classes.
* @author Alessandro Vurro
Expand Down Expand Up @@ -370,12 +378,12 @@ public static String mapperClassName(Class<?> destination, Class<?> source, Stri
// if resource is a content, the mapper must be regenerated,
// to ensure this, to the name is appended a random integer
if(!isPath(resource))
return className+= String.valueOf(new Random().nextInt());
return write(className, String.valueOf(resource.hashCode()));

String[]dep = resource.split("\\\\");
if(dep.length<=1)dep = resource.split("/");
String xml = dep[dep.length-1];
return className += xml.replaceAll("\\.","").replaceAll(" ","");
return write(className, xml.replaceAll("\\.","").replaceAll(" ",""));
}

/**
Expand Down

0 comments on commit f358dab

Please sign in to comment.