Package org.jboss.iiop.rmi.ir

Source Code of org.jboss.iiop.rmi.ir.ExceptionDefImpl

/*     */ package org.jboss.iiop.rmi.ir;
/*     */
/*     */ import org.omg.CORBA.AliasDef;
/*     */ import org.omg.CORBA.Any;
/*     */ import org.omg.CORBA.BAD_INV_ORDER;
/*     */ import org.omg.CORBA.ConstantDef;
/*     */ import org.omg.CORBA.Contained;
/*     */ import org.omg.CORBA.ContainedOperations;
/*     */ import org.omg.CORBA.DefinitionKind;
/*     */ import org.omg.CORBA.EnumDef;
/*     */ import org.omg.CORBA.ExceptionDef;
/*     */ import org.omg.CORBA.ExceptionDefHelper;
/*     */ import org.omg.CORBA.ExceptionDefOperations;
/*     */ import org.omg.CORBA.ExceptionDefPOATie;
/*     */ import org.omg.CORBA.ExceptionDescription;
/*     */ import org.omg.CORBA.ExceptionDescriptionHelper;
/*     */ import org.omg.CORBA.IDLType;
/*     */ import org.omg.CORBA.IDLTypeHelper;
/*     */ import org.omg.CORBA.IRObject;
/*     */ import org.omg.CORBA.Initializer;
/*     */ import org.omg.CORBA.InterfaceDef;
/*     */ import org.omg.CORBA.ModuleDef;
/*     */ import org.omg.CORBA.NativeDef;
/*     */ import org.omg.CORBA.ORB;
/*     */ import org.omg.CORBA.StructDef;
/*     */ import org.omg.CORBA.StructMember;
/*     */ import org.omg.CORBA.TypeCode;
/*     */ import org.omg.CORBA.UnionDef;
/*     */ import org.omg.CORBA.UnionMember;
/*     */ import org.omg.CORBA.ValueBoxDef;
/*     */ import org.omg.CORBA.ValueDef;
/*     */
/*     */ class ExceptionDefImpl extends ContainedImpl
/*     */   implements ExceptionDefOperations, LocalContainer
/*     */ {
/*     */   private ContainerImplDelegate delegate;
/* 296 */   private ExceptionDef ref = null;
/*     */   private TypeCode typeCode;
/*     */   ValueDefImpl vDef;
/*     */   private StructMember[] members;
/*     */
/*     */   ExceptionDefImpl(String id, String name, String version, TypeCode typeCode, ValueDefImpl vDef, LocalContainer defined_in, RepositoryImpl repository)
/*     */   {
/*  75 */     super(id, name, version, defined_in, DefinitionKind.dk_Exception, repository);
/*     */
/*  78 */     this.delegate = new ContainerImplDelegate(this);
/*  79 */     this.typeCode = typeCode;
/*  80 */     this.vDef = vDef;
/*     */   }
/*     */
/*     */   public LocalContained _lookup(String search_name)
/*     */   {
/*  89 */     return this.delegate._lookup(search_name);
/*     */   }
/*     */
/*     */   public LocalContained[] _contents(DefinitionKind limit_type, boolean exclude_inherited)
/*     */   {
/*  95 */     return this.delegate._contents(limit_type, exclude_inherited);
/*     */   }
/*     */
/*     */   public LocalContained[] _lookup_name(String search_name, int levels_to_search, DefinitionKind limit_type, boolean exclude_inherited)
/*     */   {
/* 103 */     return this.delegate._lookup_name(search_name, levels_to_search, limit_type, exclude_inherited);
/*     */   }
/*     */
/*     */   public void add(String name, LocalContained contained)
/*     */     throws IRConstructionException
/*     */   {
/* 110 */     throw new RuntimeException("Should never reach this point.");
/*     */   }
/*     */
/*     */   public Contained lookup(String search_name)
/*     */   {
/* 118 */     return this.delegate.lookup(search_name);
/*     */   }
/*     */
/*     */   public Contained[] contents(DefinitionKind limit_type, boolean exclude_inherited)
/*     */   {
/* 124 */     return this.delegate.contents(limit_type, exclude_inherited);
/*     */   }
/*     */
/*     */   public Contained[] lookup_name(String search_name, int levels_to_search, DefinitionKind limit_type, boolean exclude_inherited)
/*     */   {
/* 131 */     return this.delegate.lookup_name(search_name, levels_to_search, limit_type, exclude_inherited);
/*     */   }
/*     */
/*     */   public org.omg.CORBA.ContainerPackage.Description[] describe_contents(DefinitionKind limit_type, boolean exclude_inherited, int max_returned_objs)
/*     */   {
/* 140 */     return this.delegate.describe_contents(limit_type, exclude_inherited, max_returned_objs);
/*     */   }
/*     */
/*     */   public ModuleDef create_module(String id, String name, String version)
/*     */   {
/* 146 */     return this.delegate.create_module(id, name, version);
/*     */   }
/*     */
/*     */   public ConstantDef create_constant(String id, String name, String version, IDLType type, Any value)
/*     */   {
/* 152 */     return this.delegate.create_constant(id, name, version, type, value);
/*     */   }
/*     */
/*     */   public StructDef create_struct(String id, String name, String version, StructMember[] members)
/*     */   {
/* 158 */     return this.delegate.create_struct(id, name, version, members);
/*     */   }
/*     */
/*     */   public UnionDef create_union(String id, String name, String version, IDLType discriminator_type, UnionMember[] members)
/*     */   {
/* 165 */     return this.delegate.create_union(id, name, version, discriminator_type, members);
/*     */   }
/*     */
/*     */   public EnumDef create_enum(String id, String name, String version, String[] members)
/*     */   {
/* 172 */     return this.delegate.create_enum(id, name, version, members);
/*     */   }
/*     */
/*     */   public AliasDef create_alias(String id, String name, String version, IDLType original_type)
/*     */   {
/* 178 */     return this.delegate.create_alias(id, name, version, original_type);
/*     */   }
/*     */
/*     */   public InterfaceDef create_interface(String id, String name, String version, InterfaceDef[] base_interfaces, boolean is_abstract)
/*     */   {
/* 185 */     return this.delegate.create_interface(id, name, version, base_interfaces, is_abstract);
/*     */   }
/*     */
/*     */   public ValueDef create_value(String id, String name, String version, boolean is_custom, boolean is_abstract, ValueDef base_value, boolean is_truncatable, ValueDef[] abstract_base_values, InterfaceDef[] supported_interfaces, Initializer[] initializers)
/*     */   {
/* 196 */     return this.delegate.create_value(id, name, version, is_custom, is_abstract, base_value, is_truncatable, abstract_base_values, supported_interfaces, initializers);
/*     */   }
/*     */
/*     */   public ValueBoxDef create_value_box(String id, String name, String version, IDLType original_type_def)
/*     */   {
/* 205 */     return this.delegate.create_value_box(id, name, version, original_type_def);
/*     */   }
/*     */
/*     */   public ExceptionDef create_exception(String id, String name, String version, StructMember[] members)
/*     */   {
/* 211 */     return this.delegate.create_exception(id, name, version, members);
/*     */   }
/*     */
/*     */   public NativeDef create_native(String id, String name, String version)
/*     */   {
/* 216 */     return this.delegate.create_native(id, name, version);
/*     */   }
/*     */
/*     */   public IRObject getReference()
/*     */   {
/* 223 */     if (this.ref == null) {
/* 224 */       this.ref = ExceptionDefHelper.narrow(servantToReference(new ExceptionDefPOATie(this)));
/*     */     }
/*     */
/* 227 */     return this.ref;
/*     */   }
/*     */
/*     */   public void allDone()
/*     */     throws IRConstructionException
/*     */   {
/* 233 */     getReference();
/* 234 */     this.delegate.allDone();
/*     */   }
/*     */
/*     */   public org.omg.CORBA.ContainedPackage.Description describe()
/*     */   {
/* 241 */     String defined_in_id = "IR";
/*     */
/* 243 */     if ((this.defined_in instanceof ContainedOperations)) {
/* 244 */       defined_in_id = ((ContainedOperations)this.defined_in).id();
/*     */     }
/* 246 */     ExceptionDescription ed = new ExceptionDescription(this.name, this.id, defined_in_id, this.version, type());
/*     */
/* 250 */     Any any = getORB().create_any();
/*     */
/* 252 */     ExceptionDescriptionHelper.insert(any, ed);
/*     */
/* 254 */     return new org.omg.CORBA.ContainedPackage.Description(DefinitionKind.dk_Exception, any);
/*     */   }
/*     */
/*     */   public TypeCode type()
/*     */   {
/* 261 */     return this.typeCode;
/*     */   }
/*     */
/*     */   public StructMember[] members()
/*     */   {
/* 266 */     if (this.members == null) {
/* 267 */       TypeCode type = this.vDef.type();
/* 268 */       LocalIDLType localTypeDef = IDLTypeImpl.getIDLType(type, this.repository);
/* 269 */       IDLType type_def = IDLTypeHelper.narrow(localTypeDef.getReference());
/*     */
/* 271 */       this.members = new StructMember[1];
/* 272 */       this.members[0] = new StructMember("value", type, type_def);
/*     */     }
/* 274 */     return this.members;
/*     */   }
/*     */
/*     */   public void members(StructMember[] arg)
/*     */   {
/* 279 */     throw new BAD_INV_ORDER("Cannot change RMI/IIOP mapping.");
/*     */   }
/*     */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name:     org.jboss.iiop.rmi.ir.ExceptionDefImpl
* JD-Core Version:    0.6.0
*/
TOP

Related Classes of org.jboss.iiop.rmi.ir.ExceptionDefImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.