org.glassfish.pfl.dynamic.copyobject.impl
Interface Exceptions


@ExceptionWrapper(idPrefix="OBJCOPY")
public interface Exceptions

Exception wrapper class. The logex WrapperGenerator uses this interface to generate an implementation which returns the appropriate exception, and generates a log report when the method is called. This is used for all implementation classes in this package. The exception IDs are allocated in blocks of EXCEPTIONS_PER_CLASS, which is a lot more than is needed, but we have 32 bits for IDs, and multiples of a suitably chosen EXCEPTIONS_PER_CLASS (like 100 here) are easy to read in error messages.

Author:
ken

Field Summary
static int CCB_START
           
static int CCFPI_START
           
static int CCOI_START
           
static int DC_START
           
static int EXCEPTIONS_PER_CLASS
           
static int FB_START
           
static Exceptions self
           
 
Method Summary
 ReflectiveCopyException cannotCopyClass(Class<?> cls)
           
 ReflectiveCopyException cannotCopyInterface(Class<?> cls)
           
 ReflectiveCopyException couldNotCopy(Object obj, ReflectiveCopyException exc)
           
 IllegalStateException couldNotFindClassCopier(Class<?> cls)
           
 RuntimeException exceptionInReadResolve(Object obj, Throwable t)
           
 void failureInFallback(ReflectiveCopyException exc, Object obj, Class<?> cls)
           
 ReflectiveCopyException noClassCopierForSuperclass(Class<?> superClass)
           
 ReflectiveCopyException stackOverflow(Object source, StackOverflowError ex)
           
 

Field Detail

self

static final Exceptions self

EXCEPTIONS_PER_CLASS

static final int EXCEPTIONS_PER_CLASS
See Also:
Constant Field Values

FB_START

static final int FB_START
See Also:
Constant Field Values

CCB_START

static final int CCB_START
See Also:
Constant Field Values

DC_START

static final int DC_START
See Also:
Constant Field Values

CCFPI_START

static final int CCFPI_START
See Also:
Constant Field Values

CCOI_START

static final int CCOI_START
See Also:
Constant Field Values
Method Detail

failureInFallback

@Message(value="Object copy failed on copy of {0} which has type {1}")
@Log(id=1,
     level=FINE)
void failureInFallback(@Chain
                                   ReflectiveCopyException exc,
                                   Object obj,
                                   Class<?> cls)

stackOverflow

@Message(value="Stack overflow while copying {0}")
@Log(id=101,
     level=WARNING)
ReflectiveCopyException stackOverflow(Object source,
                                                  @Chain
                                                  StackOverflowError ex)

couldNotCopy

@Message(value="Could not copy {0}")
@Log(id=201,
     level=WARNING)
ReflectiveCopyException couldNotCopy(Object obj,
                                                 ReflectiveCopyException exc)

cannotCopyInterface

@Log(id=301,
     level=WARNING)
@Message(value="Cannot copy interface (attempt was for {0})")
ReflectiveCopyException cannotCopyInterface(Class<?> cls)

couldNotFindClassCopier

@Log(id=302,
     level=WARNING)
@Message(value="Could not find ClassCopier for {0}")
IllegalStateException couldNotFindClassCopier(Class<?> cls)

cannotCopyClass

@Log(id=303,
     level=WARNING)
@Message(value="Could not copy class {0}")
ReflectiveCopyException cannotCopyClass(Class<?> cls)

exceptionInReadResolve

@Message(value="Exception in readResolve() for {0}")
@Log(id=401,
     level=WARNING)
RuntimeException exceptionInReadResolve(Object obj,
                                                    @Chain
                                                    Throwable t)

noClassCopierForSuperclass

@Message(value="Cannot create ClassFieldCopier for superclass {0} : This class already has a ClassCopier")
@Log(id=401,
     level=WARNING)
ReflectiveCopyException noClassCopierForSuperclass(Class<?> superClass)


Copyright © 2013 Oracle. All Rights Reserved.