Package org.jboss.iiop.rmi.ir

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

/*     */ package org.jboss.iiop.rmi.ir;
/*     */
/*     */ import org.omg.CORBA.Any;
/*     */ import org.omg.CORBA.AttributeDef;
/*     */ import org.omg.CORBA.AttributeDefHelper;
/*     */ import org.omg.CORBA.AttributeDefOperations;
/*     */ import org.omg.CORBA.AttributeDefPOATie;
/*     */ import org.omg.CORBA.AttributeDescription;
/*     */ import org.omg.CORBA.AttributeDescriptionHelper;
/*     */ import org.omg.CORBA.AttributeMode;
/*     */ import org.omg.CORBA.BAD_INV_ORDER;
/*     */ import org.omg.CORBA.ContainedOperations;
/*     */ import org.omg.CORBA.ContainedPackage.Description;
/*     */ import org.omg.CORBA.DefinitionKind;
/*     */ import org.omg.CORBA.IDLType;
/*     */ import org.omg.CORBA.IDLTypeHelper;
/*     */ import org.omg.CORBA.IRObject;
/*     */ import org.omg.CORBA.ORB;
/*     */ import org.omg.CORBA.TypeCode;
/*     */
/*     */ public class AttributeDefImpl extends ContainedImpl
/*     */   implements AttributeDefOperations
/*     */ {
/* 152 */   private AttributeDef ref = null;
/*     */   private AttributeMode mode;
/*     */   private TypeCode typeCode;
/*     */   private LocalIDLType type_def;
/*     */
/*     */   AttributeDefImpl(String id, String name, String version, AttributeMode mode, TypeCode typeCode, LocalContainer defined_in, RepositoryImpl repository)
/*     */   {
/*  62 */     super(id, name, version, defined_in, DefinitionKind.dk_Attribute, repository);
/*     */
/*  65 */     this.mode = mode;
/*  66 */     this.typeCode = typeCode;
/*     */   }
/*     */
/*     */   public IRObject getReference()
/*     */   {
/*  76 */     if (this.ref == null) {
/*  77 */       this.ref = AttributeDefHelper.narrow(servantToReference(new AttributeDefPOATie(this)));
/*     */     }
/*     */
/*  80 */     return this.ref;
/*     */   }
/*     */
/*     */   public void allDone()
/*     */     throws IRConstructionException
/*     */   {
/*  87 */     this.type_def = IDLTypeImpl.getIDLType(this.typeCode, this.repository);
/*     */
/*  89 */     getReference();
/*     */   }
/*     */
/*     */   public TypeCode type()
/*     */   {
/*  97 */     return this.typeCode;
/*     */   }
/*     */
/*     */   public IDLType type_def()
/*     */   {
/* 102 */     return IDLTypeHelper.narrow(this.type_def.getReference());
/*     */   }
/*     */
/*     */   public void type_def(IDLType arg)
/*     */   {
/* 107 */     throw new BAD_INV_ORDER("Cannot change RMI/IIOP mapping.");
/*     */   }
/*     */
/*     */   public AttributeMode mode()
/*     */   {
/* 112 */     return this.mode;
/*     */   }
/*     */
/*     */   public void mode(AttributeMode arg)
/*     */   {
/* 117 */     throw new BAD_INV_ORDER("Cannot change RMI/IIOP mapping.");
/*     */   }
/*     */
/*     */   public Description describe()
/*     */   {
/* 125 */     String defined_in_id = "IR";
/*     */
/* 127 */     if ((this.defined_in instanceof ContainedOperations)) {
/* 128 */       defined_in_id = ((ContainedOperations)this.defined_in).id();
/*     */     }
/* 130 */     AttributeDescription d = new AttributeDescription(this.name, this.id, defined_in_id, this.version, this.typeCode, this.mode);
/*     */
/* 134 */     Any any = getORB().create_any();
/*     */
/* 136 */     AttributeDescriptionHelper.insert(any, d);
/*     */
/* 138 */     return new Description(DefinitionKind.dk_Attribute, any);
/*     */   }
/*     */ }

/* 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.AttributeDefImpl
* JD-Core Version:    0.6.0
*/
TOP

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

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.