Skip to content

Commit

Permalink
Move ClassDefinitionUtils and ClassUtils where they are used (close #79)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Tremblay authored and Henri Tremblay committed Mar 6, 2021
1 parent 203cec8 commit 7c2a514
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import org.objenesis.instantiator.ObjectInstantiator;
import org.objenesis.instantiator.annotations.Instantiator;
import org.objenesis.instantiator.annotations.Typology;
import org.objenesis.instantiator.util.ClassDefinitionUtils;
import org.objenesis.instantiator.util.ClassUtils;
import org.objenesis.instantiator.exotic.util.ClassDefinitionUtils;
import org.objenesis.instantiator.exotic.util.ClassUtils;

import static org.objenesis.instantiator.util.ClassDefinitionUtils.*;
import static org.objenesis.instantiator.exotic.util.ClassDefinitionUtils.*;

/**
* This instantiator will correctly bypass the constructors by instantiating the class using the default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.objenesis.instantiator.ObjectInstantiator;
import org.objenesis.instantiator.annotations.Instantiator;
import org.objenesis.instantiator.annotations.Typology;
import org.objenesis.instantiator.util.ClassUtils;
import org.objenesis.instantiator.exotic.util.ClassUtils;

/**
* The simplest instantiator - simply calls Class.newInstance(). This can deal with default public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import org.objenesis.instantiator.ObjectInstantiator;
import org.objenesis.instantiator.annotations.Instantiator;
import org.objenesis.instantiator.annotations.Typology;
import org.objenesis.instantiator.util.ClassDefinitionUtils;
import org.objenesis.instantiator.util.ClassUtils;
import org.objenesis.instantiator.exotic.util.ClassDefinitionUtils;
import org.objenesis.instantiator.exotic.util.ClassUtils;

import static org.objenesis.instantiator.util.ClassDefinitionUtils.*;
import static org.objenesis.instantiator.exotic.util.ClassDefinitionUtils.*;

/**
* This instantiator creates a class by dynamically extending it. It will skip the call to the parent constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.objenesis.instantiator.util;
package org.objenesis.instantiator.exotic.util;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.objenesis.instantiator.util;
package org.objenesis.instantiator.exotic.util;

import org.objenesis.ObjenesisException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.objenesis.instantiator.util;
package org.objenesis.instantiator.exotic.util;

import org.objenesis.instantiator.util.UnsafeUtils;
import sun.misc.Unsafe;
import org.objenesis.ObjenesisException;
import org.objenesis.strategy.PlatformDescription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.objenesis;
package org.objenesis.instantiator.exotic;

import org.objenesis.instantiator.util.ClassUtils;
import org.objenesis.instantiator.exotic.util.ClassUtils;

import java.io.DataInputStream;
import java.io.FileInputStream;
Expand All @@ -24,7 +24,7 @@
import java.util.Arrays;

import static org.junit.Assert.*;
import static org.objenesis.instantiator.util.ClassDefinitionUtils.*;
import static org.objenesis.instantiator.exotic.util.ClassDefinitionUtils.*;

/**
* @author Henri Tremblay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.objenesis.instantiator.util;
package org.objenesis.instantiator.exotic.util;

import org.junit.Test;
import org.objenesis.Objenesis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.objenesis.instantiator.util;
package org.objenesis.instantiator.exotic.util;

import org.junit.Test;
import org.objenesis.ObjenesisException;
Expand Down

0 comments on commit 7c2a514

Please sign in to comment.