Public Member Functions | Static Public Member Functions | Static Package Functions

alma.acs.container.corba.CorbaNullFinder Class Reference

List of all members.

Public Member Functions

 CorbaNullFinder (Object corbaData)
boolean hasErrors ()
List< String > getErrors ()

Static Public Member Functions

static boolean isIDLInterfaceClass (Class<?> clzz)

Static Package Functions

static boolean isIDLEnumClass (Class<?> clzz)
static boolean isIDLStructClass (Class<?> clzz)

Detailed Description

This class finds illegal null values in corba parameters or return values, such as null strings inside structs. It uses java reflection to navigate the possibly nested data.

Motivation: On the server side of a corba call, the implementation cannot catch and evaluate the resulting marshalling or NullPointer exceptions, which are often very unclear about the cause of the problem. Thus to help with debugging, this class can be used to analyze return values or out parameters, and report possible problems in an understandable way. Alternatively, this class can also be used on the client side of a corba call, although it will be less useful there, because marshalling errors for client data produces rather tangible exceptions.

One CorbaNullFinder object must be constructed for every corba parameter / return value to be checked. Then calling the methods hasErrors() or getErrors() will run the check and report the result.

Author:
hsommer
Since:
ACS 9.0 (see )

Constructor & Destructor Documentation

alma.acs.container.corba.CorbaNullFinder.CorbaNullFinder ( Object  corbaData  ) 

Constructor from the top-level corba parameter or return value. Must not be used for corba object references (e.g. offshoot references), which may be null, but cannot be distinguished from illegal null structs etc.


Member Function Documentation

List<String> alma.acs.container.corba.CorbaNullFinder.getErrors (  ) 

Gets the textual description of the errors found, including the pathname of the affected data item(s).

Returns:
List of errors found, or empty list if there are no errors.
boolean alma.acs.container.corba.CorbaNullFinder.hasErrors (  ) 
Returns:
true if there were errors in the corba data passed to the constructor, false otherwise.
static boolean alma.acs.container.corba.CorbaNullFinder.isIDLEnumClass ( Class<?>  clzz  )  [static, package]
static boolean alma.acs.container.corba.CorbaNullFinder.isIDLInterfaceClass ( Class<?>  clzz  )  [static]
static boolean alma.acs.container.corba.CorbaNullFinder.isIDLStructClass ( Class<?>  clzz  )  [static, package]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties