Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thoughtworks.xstream.converters.reflection
Class HarmonyReflectionProvider

    java.lang.Object
      com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider
          com.thoughtworks.xstream.converters.reflection.HarmonyReflectionProvider

All Implemented Interfaces:
  ReflectionProvider

    public class HarmonyReflectionProvider

extends PureJavaReflectionProvider

Instantiates a new object on the Harmony JVM by bypassing the constructor (meaning code in the constructor will never be executed and parameters do not have to be known). This is the same method used by the internals of standard Java serialization, but relies on internal Harmony code. Note, this is work in progress. Harmony 5.0M4 crashes instantiating a class derived from `com.thoughtworks.acceptance.objects.StandardObject`, of type `JTable` or `Font`. Additionally it fails with a NPE processing the annotations and has a wrong offset dealing with time zone. Same problems apply to 5.0M5.

Author:
  Jörg Schaible, Joe Walnes

Nested Class Summary

Nested classes/interfaces inherited from interface com.thoughtworks.xstream.converters.reflection.ReflectionProvider
`ReflectionProvider.Visitor`

Field Summary

Fields inherited from class com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider
`fieldDictionary`

Constructor Summary
`HarmonyReflectionProvider()`
`HarmonyReflectionProvider(FieldDictionary dic)`

Method Summary
`Object` | `newInstance(Class type)` Creates a new instance of the specified type.
`protected void` | `validateFieldAccess(Field field)`
`void` | `writeField(Object object, String fieldName, Object value, Class definedIn)`

Methods inherited from class com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider
`fieldDefinedInClass, fieldModifiersSupported, getField, getFieldType, readResolve, setFieldDictionary, visitSerializableFields`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HarmonyReflectionProvider

    public HarmonyReflectionProvider()

### HarmonyReflectionProvider

    public HarmonyReflectionProvider(FieldDictionary dic)

Method Detail

### newInstance

    public Object newInstance(Class type)

  Description copied from interface: `ReflectionProvider`
  Creates a new instance of the specified type. It is in the responsibility of the implementation how such an instance is created.

  Specified by:
    `newInstance` in interface `ReflectionProvider`
  Overrides:
    `newInstance` in class `PureJavaReflectionProvider`
  Parameters:
    `type` - the type to instantiate
  Returns:
    a new instance of this type

### writeField

    public void writeField(Object object,
                           String fieldName,
                           Object value,
                           Class definedIn)

  Specified by:
    `writeField` in interface `ReflectionProvider`
  Overrides:
    `writeField` in class `PureJavaReflectionProvider`

### validateFieldAccess

    protected void validateFieldAccess(Field field)

  Overrides:
    `validateFieldAccess` in class `PureJavaReflectionProvider`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 XStream. All Rights Reserved.