KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnode > Made > CDL > CompExprDefault


1 /* $Id: CompExprDefault.java,v 1.2 2004/05/20 14:23:51 bures Exp $ */
2 package SOFA.SOFAnode.Made.CDL;
3 import java.rmi.RemoteException JavaDoc;
4
5 import SOFA.SOFAnode.Made.TIR.CDLRepository;
6 import SOFA.SOFAnode.Made.TIR.ExprOperDef;
7 import SOFA.SOFAnode.Made.TIR.Repository;
8 import SOFA.SOFAnode.Made.TIR.TIRExceptCreate;
9
10 class CompExprDefault extends CompExprOper {
11   public CompExprDefault() {
12     super(CompExprKind.e_default);
13   }
14   public int type() { return CompExprKind.e_default; }
15   public boolean isProp() { return false; }
16   public EnumList nameProp(CompRepository rep) throws CDLExceptRemote, CDLExceptLock {
17     EnumList l = new EnumList();
18     return l;
19   }
20
21   public int isPositive() {
22     return -2;
23   }
24
25   public ExprOperDef toNormal(CDLRepository rep) throws CDLExceptToNormal, CDLExceptRemote, CDLExceptLock {
26     try {
27       return ((Repository) rep.get_containing_repository()).create_exprdefault();
28     } catch (RemoteException JavaDoc e) {
29       throw new CDLExceptRemote("Remote exception occured: "+e.getMessage());
30     } catch (TIRExceptCreate ecr) {
31       throw new CDLExceptToNormal("Can't create expression");
32     }
33   }
34
35   public String JavaDoc toString() {
36     return "default";
37   }
38 }
39
Popular Tags