Package net.sf.joafip.store.entity.classinfo

Examples of net.sf.joafip.store.entity.classinfo.ClassInfo


  @Override
  public ObjectAndPersistInfo getOrCreateObjectPersistInfoOfObject(
      final Object object, final Boolean proxyInstance,
      final boolean persisted) throws ObjectIOException,
      ObjectIODataCorruptedException {
    final ClassInfo objectClassInfo;
    try {
      objectClassInfo = classInfoFactory.getNoProxyClassInfo(object
          .getClass());
    } catch (ClassInfoException exception) {
      throw new ObjectIOException(exception);
View Full Code Here


    intercepted = null;// NOPMD
    final ClassInfoFactory classInfoFactory = new ClassInfoFactory(1);
    classInfoFactory.setConversionManager(new ConversionManager(
        classInfoFactory));

    final ClassInfo classInfo = classInfoFactory
        .getNoProxyClassInfo(objectClass);
    final StorageInfo storageInfo = new StorageInfo();
    final ClassLoaderProvider classLoaderProvider = new ClassLoaderProvider();
    final ProxyManager2 proxyManager2 = new ProxyManager2(
        classLoaderProvider, classInfoFactory);
View Full Code Here

    super(name);
  }

  public void test() throws ClassInfoException, ProxyException {
    final Class<Bob1> objectClass = Bob1.class;
    final ClassInfo classInfo = classInfoFactory
        .getNoProxyClassInfo(objectClass);
    final StorageInfo storageInfo = new StorageInfo();
    final ProxyManager2 proxyManager2 = new ProxyManager2(
        new ClassLoaderProvider(), classInfoFactory);
    // change persistence id to have a new proxy class name
View Full Code Here

    intercepted = null;// NOPMD
    final ClassInfoFactory classInfoFactory = new ClassInfoFactory(1);
    classInfoFactory.setConversionManager(new ConversionManager(
        classInfoFactory));

    final ClassInfo classInfo = classInfoFactory
        .getNoProxyClassInfo(objectClass);
    final StorageInfo storageInfo = new StorageInfo();
    final ClassLoaderProvider classLoaderProvider = new ClassLoaderProvider();
    final ProxyManager2 proxyManager2 = new ProxyManager2(
        classLoaderProvider, classInfoFactory);
View Full Code Here

  public void test1() throws ProxyException, ObjectIOException,
      ObjectIOInvalidClassException, ClassInfoException {
    setted = false;
    final Class<?> objectClass = Bob1.class;

    final ClassInfo classInfo = classInfoFactory
        .getNoProxyClassInfo(objectClass);
    final StorageInfo storageInfo = new StorageInfo();
    final ClassLoaderProvider classLoaderProvider = new ClassLoaderProvider();
    final ProxyManager2 proxyManager2 = new ProxyManager2(
        classLoaderProvider, classInfoFactory);
View Full Code Here

  @Override
  public ObjectAndPersistInfo getOrCreateObjectPersistInfoOfObject(
      final Object object, final Boolean proxyInstance,
      final boolean persisted) throws ObjectIOException,
      ObjectIODataCorruptedException {
    final ClassInfo objectClassInfo;
    try {
      objectClassInfo = classInfoFactory.getNoProxyClassInfo(object
          .getClass());
    } catch (ClassInfoException exception) {
      throw new ObjectIOException(exception);
View Full Code Here

  @Override
  public Object newInstance(final Class<?> objectClass,
      final Class<?>[] parameterTypes, final Object[] initargs) {
    try {
      final ClassInfo objectClassInfo = classInfoFactory
          .getNoProxyClassInfo(objectClass);
      return proxyManager2.newInstanceConstruct(objectClassInfo,
          parameterTypes, initargs, new StorageInfo(), this, null,
          true);
    } catch (ClassInfoException exception) {
View Full Code Here

  }

  @Override
  public Object newInstance(final Class<?> objectClass) {
    try {
      final ClassInfo objectClassInfo = classInfoFactory
          .getNoProxyClassInfo(objectClass);
      return proxyManager2.newInstanceConstruct(objectClassInfo,
          new StorageInfo(), this, null, true);
    } catch (ClassInfoException exception) {
      throw new ObjectIORuntimeException(exception);
View Full Code Here

  public void testPrimitive() throws ClassNotFoundException,
      ConversionException, ClassInfoException {
    final Class<?> intClass = int.class;
    final String name = intClass.getName();
    final ClassInfo classInfoByClass = classInfoFactory
        .getNoProxyClassInfo(intClass);
    classInfoFactory.clear();
    assertTrue(CLASS_MUST_EXIST, classInfoByClass.classExists());
    assertEquals(BAD_CLASS_INFO_BY_CLASS_CLASS, intClass,
        classInfoByClass.getObjectClass());
    assertEquals(BAD_CLASS_INFO_BY_CLASS_NAME, name,
        classInfoByClass.getName());

    final ClassInfo classInfoByName = classInfoFactory.getClassInfo(name);
    classInfoFactory.clear();

    assertTrue(CLASS_MUST_EXIST, classInfoByName.classExists());
    assertEquals(BAD_CLASS_INFO_BY_NAME_NAME, name,
        classInfoByName.getName());
    assertEquals(BAD_CLASS_INFO_BY_NAME_CLASS, intClass,
        classInfoByName.getObjectClass());
  }
View Full Code Here

  public void testIntArray() throws ClassInfoException,
      ClassNotFoundException, ConversionException {
    final int[] intArray = new int[0];
    final Class<?> intArrayClass = intArray.getClass();
    final String name = intArrayClass.getName();
    final ClassInfo classInfoByClass = classInfoFactory
        .getNoProxyClassInfo(intArrayClass);
    classInfoFactory.clear();
    assertTrue(CLASS_MUST_EXIST, classInfoByClass.classExists());
    assertEquals(BAD_CLASS_INFO_BY_CLASS_CLASS, intArrayClass,
        classInfoByClass.getObjectClass());

    final ClassInfo classInfoByName = classInfoFactory.getClassInfo(name);
    classInfoFactory.clear();

    assertTrue(CLASS_MUST_EXIST, classInfoByName.classExists());
    assertEquals(BAD_CLASS_INFO_BY_NAME_NAME, name,
        classInfoByName.getName());
    assertEquals(BAD_CLASS_INFO_BY_NAME_CLASS, intArrayClass,
        classInfoByName.getObjectClass());
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.entity.classinfo.ClassInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.