FileDocCategorySizeDatePackage
DynValueBoxImpl.javaAPI DocJava SE 5 API3217Fri Aug 26 14:54:20 BST 2005com.sun.corba.se.impl.dynamicany

DynValueBoxImpl

public class DynValueBoxImpl extends DynValueCommonImpl implements DynValueBox

Fields Summary
Constructors Summary
private DynValueBoxImpl()

        this(null, (Any)null, false);
    
protected DynValueBoxImpl(com.sun.corba.se.spi.orb.ORB orb, org.omg.CORBA.Any any, boolean copyValue)

        super(orb, any, copyValue);
    
protected DynValueBoxImpl(com.sun.corba.se.spi.orb.ORB orb, org.omg.CORBA.TypeCode typeCode)

        super(orb, typeCode);
    
Methods Summary
public org.omg.CORBA.Anyget_boxed_value()

        if (isNull) {
            throw new InvalidValue();
        }
        checkInitAny();
        return any;
    
public DynAnyget_boxed_value_as_dyn_any()

        if (isNull) {
            throw new InvalidValue();
        }
        checkInitComponents();
        return components[0];
    
protected booleaninitializeAnyFromComponents()

        any = getAny(components[0]);
        return true;
    
protected booleaninitializeComponentsFromAny()

        try {
            components = new DynAny[] {DynAnyUtil.createMostDerivedDynAny(any, orb, false)};
        } catch (InconsistentTypeCode ictc) {
            return false; // impossible
        }
        return true;
    
protected booleaninitializeComponentsFromTypeCode()

        try {
            any = DynAnyUtil.createDefaultAnyOfType(any.type(), orb);
            components = new DynAny[] {DynAnyUtil.createMostDerivedDynAny(any, orb, false)};
        } catch (InconsistentTypeCode ictc) {
            return false; // impossible
        }
        return true;
    
public voidset_boxed_value(org.omg.CORBA.Any boxed)

        if ( ! isNull && ! boxed.type().equal(this.type())) {
            throw new TypeMismatch();
        }
        clearData();
        any = boxed;
        representations = REPRESENTATION_ANY;
        index = 0;
        isNull = false;
    
public voidset_boxed_value_as_dyn_any(DynAny boxed)

        if ( ! isNull && ! boxed.type().equal(this.type())) {
            throw new TypeMismatch();
        }
        clearData();
        components = new DynAny[] {boxed};
        representations = REPRESENTATION_COMPONENTS;
        index = 0;
        isNull = false;