mirror of https://github.com/apache/openjpa.git
OPENJPA-2911 move BytecodeWriter to openjpa-kernel
had no usage in openjpa-lib but introduced dependeny to Serp over there
This commit is contained in:
parent
96a64bceba
commit
bcb00d8909
|
@ -32,7 +32,7 @@ import java.util.Set;
|
|||
|
||||
import org.apache.openjpa.conf.OpenJPAConfiguration;
|
||||
import org.apache.openjpa.lib.log.Log;
|
||||
import org.apache.openjpa.lib.util.BytecodeWriter;
|
||||
import org.apache.openjpa.util.asm.BytecodeWriter;
|
||||
import org.apache.openjpa.lib.util.Files;
|
||||
import org.apache.openjpa.lib.util.Localizer;
|
||||
import org.apache.openjpa.lib.util.Localizer.Message;
|
||||
|
|
|
@ -62,7 +62,7 @@ import org.apache.openjpa.conf.OpenJPAConfigurationImpl;
|
|||
import org.apache.openjpa.lib.conf.Configurations;
|
||||
import org.apache.openjpa.lib.log.Log;
|
||||
import org.apache.openjpa.lib.meta.ClassArgParser;
|
||||
import org.apache.openjpa.lib.util.BytecodeWriter;
|
||||
import org.apache.openjpa.util.asm.BytecodeWriter;
|
||||
import org.apache.openjpa.lib.util.ClassUtil;
|
||||
import org.apache.openjpa.lib.util.Files;
|
||||
import org.apache.openjpa.lib.util.J2DoPrivHelper;
|
||||
|
@ -124,16 +124,13 @@ public class PCEnhancer {
|
|||
public static final int ENHANCER_VERSION;
|
||||
public static final Type TYPE_OBJECT = Type.getType(Object.class);
|
||||
|
||||
boolean _addVersionInitFlag = true;
|
||||
|
||||
public static final int ENHANCE_NONE = 0;
|
||||
public static final int ENHANCE_AWARE = 2 << 0;
|
||||
public static final int ENHANCE_INTERFACE = 2 << 1;
|
||||
public static final int ENHANCE_PC = 2 << 2;
|
||||
|
||||
public static final String PRE = "pc";
|
||||
public static final String ISDETACHEDSTATEDEFINITIVE = PRE
|
||||
+ "isDetachedStateDefinitive";
|
||||
public static final String ISDETACHEDSTATEDEFINITIVE = PRE + "isDetachedStateDefinitive";
|
||||
|
||||
private static final Class<?> PCTYPE = PersistenceCapable.class;
|
||||
private static final String SM = PRE + "StateManager";
|
||||
|
@ -149,10 +146,8 @@ public class PCEnhancer {
|
|||
|
||||
private static final String VERSION_INIT_STR = PRE + "VersionInit";
|
||||
|
||||
private static final Localizer _loc = Localizer.forPackage
|
||||
(PCEnhancer.class);
|
||||
private static final String REDEFINED_ATTRIBUTE
|
||||
= PCEnhancer.class.getName() + "#redefined-type";
|
||||
private static final Localizer _loc = Localizer.forPackage(PCEnhancer.class);
|
||||
private static final String REDEFINED_ATTRIBUTE = PCEnhancer.class.getName() + "#redefined-type";
|
||||
|
||||
private static final AuxiliaryEnhancer[] _auxEnhancers;
|
||||
|
||||
|
@ -200,6 +195,8 @@ public class PCEnhancer {
|
|||
private BCClass _pc;
|
||||
private final BCClass _managedType;
|
||||
private final MetaDataRepository _repos;
|
||||
boolean _addVersionInitFlag = true;
|
||||
|
||||
|
||||
/**
|
||||
* represents the managed type.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.openjpa.lib.util;
|
||||
package org.apache.openjpa.util.asm;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||
import org.apache.openjpa.conf.OpenJPAConfiguration;
|
||||
import org.apache.openjpa.conf.OpenJPAConfigurationImpl;
|
||||
import org.apache.openjpa.lib.conf.Configurations;
|
||||
import org.apache.openjpa.lib.util.BytecodeWriter;
|
||||
import org.apache.openjpa.util.asm.BytecodeWriter;
|
||||
import org.apache.openjpa.lib.util.J2DoPrivHelper;
|
||||
import org.apache.openjpa.lib.util.Options;
|
||||
import org.apache.openjpa.meta.MetaDataRepository;
|
||||
|
@ -136,8 +136,7 @@ public class TestEnhancementWithMultiplePUs
|
|||
|
||||
@Override
|
||||
public void write(BCClass type) throws IOException {
|
||||
assertTrue(Arrays.asList(type.getInterfaceNames()).contains(
|
||||
PersistenceCapable.class.getName()));
|
||||
assertTrue(Arrays.asList(type.getInterfaceNames()).contains(PersistenceCapable.class.getName()));
|
||||
written.add(type.getName());
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue