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

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


  }

  protected ClassDef getClassReplacementDef(final Class<?> clazz)
      throws ImportException {
    try {
      final ClassInfo classInfo = classInfoFactory
          .getNoProxyClassInfo(clazz);
      return classReplacementDef(classInfo);
    } catch (final ClassInfoException exception) {
      throw new ImportException(exception);
    }
View Full Code Here


   * @throws ImportClassNotFoundException
   */
  protected ClassDef classForName(final String className)
      throws ImportException, ImportClassNotFoundException {
    try {
      final ClassInfo classInfo = classInfoFactory
          .getClassInfo(className);
      return classReplacementDef(classInfo);
    } catch (final ClassNotFoundException exception) {
      throw new ImportClassNotFoundException(exception);
    } catch (final ClassInfoException exception) {
View Full Code Here

  }

  protected final ClassDef classDefForClass(final Class<?> clazz)
      throws ImportException {
    try {
      final ClassInfo classInfo = classInfoFactory
          .getNoProxyClassInfo(clazz);
      return classReplacementDef(classInfo);
    } catch (final ClassInfoException exception) {
      throw new ImportException(exception);
    }
View Full Code Here

      final ClassInfo arrayClassInfo, final int arrayLength)
      throws StoreException {
    try {
      arrayStartTag.addAttribute("id", objectId);
      arrayStartTag.addAttribute("size", Integer.toString(arrayLength));
      final ClassInfo componentType = arrayClassInfo.getComponentType();
      arrayStartTag.addAttribute("componentClass",
          componentType.getName());
      xmlWriter.writeStartTag(indentation, arrayStartTag,
          false/* endTag */, true/* writeNewLine */);
    } catch (XmlWriterException exception) {
      closeWriterAfterError();
      throw new StoreException(exception);
View Full Code Here

  @Override
  public void prepareWrite(final ObjectAndPersistInfo arrayAndPersistInfo)
      throws ObjectIOException, ObjectIOInvalidClassException,
      ObjectIONotSerializableException, ObjectIODataCorruptedException {
    final ClassInfo arrayClassInfo = arrayAndPersistInfo.objectClassInfo;
    final ClassInfo arrayComponentType = arrayClassInfo.getComponentType();
    final ObjectClassInfoAndDeclared[] currentValue;
    if (arrayComponentType.isPrimitiveType()) {
      currentValue = prepareWriteArrayOfPrimitive(arrayAndPersistInfo,
          arrayComponentType);
    } else {
      currentValue = prepareWtiteOfArrayOfNotPrimitive(
          arrayAndPersistInfo, arrayComponentType);
View Full Code Here

        elementObject = helperReflect.getArrayElement(array, index);
      } catch (ReflectException exception) {
        logger.fatal(REFLECT_ERROR, exception);
        throw new ObjectIOException(exception);
      }
      final ClassInfo elementClassInfo;
      if (elementObject == null) {
        elementClassInfo = ClassInfo.NULL;
      } else {
        try {
          elementClassInfo = proxyManager2
View Full Code Here

  @Override
  public int numberOfByteForData(
      final ObjectAndPersistInfo arrayAndItsClassInfo) {
    int size;
    final int elementByteSize;
    final ClassInfo arrayClassInfo = arrayAndItsClassInfo.objectClassInfo;
    final ClassInfo componentType = arrayClassInfo.getComponentType();
    elementByteSize = byteSizeForFieldOrElement(componentType);
    final int arrayLength = Array.getLength(arrayAndItsClassInfo
        .getObject());
    // 2 int: 1 for signature and 1 for array length
    // n for array elements
View Full Code Here

  @Override
  public ClassInfo getObjectClassInfo(final int classNameIdentifier)
      throws ObjectIOException, ObjectIOClassNotFoundException {
    checkLoaded();
    ClassInfo classInfo = byIdentifierClassInfo.get(classNameIdentifier);
    if (classInfo == null) {
      final String className = byIdentifierClassName
          .get(classNameIdentifier);
      try {
        classInfo = classInfoFactory.getClassInfo(className);
View Full Code Here

      final ValuedFieldList valuedFieldList = xmlImporter
          .convert(currentObject.getValuedFieldList(),
              classDef.getReplacementDef(),
              currentObject.getFieldsInfo());
      final Object object = currentObject.getObject();
      final ClassInfo classInfo = currentObject.getClassInfo();

      xmlImporter.recordObject(object, currentObject.isStateSet(),
          classInfo, valuedFieldList);
    } catch (final ImportException exception) {
      logger.error(END_ELEMENT_ERROR + location(), exception);
View Full Code Here

   */
  public void prepareWriteForSerializableDefaultWrite(
      final ObjectAndPersistInfo objectAndItsClassInfo)
      throws ObjectIOException, ObjectIOInvalidClassException,
      ObjectIONotSerializableException, ObjectIODataCorruptedException {
    final ClassInfo classInfo = objectAndItsClassInfo.objectClassInfo;
    final FieldInfo[] fields;
    try {
      fields = classInfo.getSerialPersistentFieldsInfo();
    } catch (ClassInfoException exception) {
      throw new ObjectIOException(exception);
    }
    prepareWriteGenericForFields(objectAndItsClassInfo, classInfo, fields);
  }
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.