Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


com.tangosol.io.pof.reflect
Class PofReflectionHelper

java.lang.Object
  extended by com.tangosol.io.pof.reflect.PofReflectionHelper


public class PofReflectionHelper
extends java.lang.Object

Collection of helper methods for POF reflection.

Since:
Coherence 3.5.2
Author:
dag 2009.09.14

Constructor Summary
PofReflectionHelper()
           

 

Method Summary
static java.lang.Object ensureType(java.lang.Object o, int nType, PofContext ctx)
          Validate that the supplied object is compatible with the specified type.
static java.lang.Class getClass(int nType, PofContext ctx)
          Determine the class associated with the given type identifier.

 

Constructor Detail

PofReflectionHelper

public PofReflectionHelper()

Method Detail

getClass

public static java.lang.Class getClass(int nType,
                                       PofContext ctx)
Determine the class associated with the given type identifier.
Parameters:
nType - the Pof type identifier; includes Pof intrinsics, Pof compact values, and user types.
ctx - the PofContext.
Returns:
the class associated with the specified type identifier or null for types with no mapping
Throws:
java.lang.IllegalArgumentException - if the specified type is a user type that is unknown to this PofContext

ensureType

public static java.lang.Object ensureType(java.lang.Object o,
                                          int nType,
                                          PofContext ctx)
Validate that the supplied object is compatible with the specified type.
Parameters:
o - the object
nType - the Pof type identifier; includes Pof intrinsics, Pof compact values, and user types.
ctx - the PofContext.
Returns:
the original object
Throws:
java.lang.IllegalArgumentException - if the specified type is a user type that is unknown to this PofContext or there is no type mapping
java.lang.ClassCastException - if the specified object is not assignable to the specified type

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.