summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/ForwardAttribute.java
blob: ce589762866ba0c1f0aec343eb86fc34a861c750 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*     */ package NET.worlds.scape;
/*     */ 
/*     */ import NET.worlds.core.Std;
/*     */ import java.io.DataInputStream;
/*     */ import java.io.DataOutputStream;
/*     */ import java.io.IOException;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class ForwardAttribute
/*     */   extends Attribute
/*     */   implements NonPersister
/*     */ {
/*     */   private Attribute _from;
/*     */   
/*     */   ForwardAttribute(Attribute forwarder, int attrID)
/*     */   {
/*  47 */     super(attrID);
/*  48 */     this._from = forwarder;
/*     */   }
/*     */   
/*     */ 
/*     */   protected void noteAddingTo(SuperRoot owner)
/*     */   {
/*  54 */     WObject w = (WObject)owner.getOwner();
/*  55 */     if ((w.getSharer().getMode() & 0x1) != 0) {
/*  56 */       throw new ClassCastException("Must forward to unforwarded object");
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */   public void detach()
/*     */   {
/*  64 */     super.detach();
/*     */     
/*  66 */     this._from.unforward();
/*     */   }
/*     */   
/*     */ 
/*     */   public int getFlags()
/*     */   {
/*  72 */     return this._from.getFlags();
/*     */   }
/*     */   
/*     */   public void setFlag(int flag, boolean onoff)
/*     */   {
/*  77 */     this._from.setFlag(flag, onoff);
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public void generateNetData(DataOutputStream s)
/*     */     throws IOException
/*     */   {
/*  86 */     this._from.generateNetData(s);
/*     */   }
/*     */   
/*     */   public void setFromNetData(DataInputStream ds, int len) throws IOException
/*     */   {
/*  91 */     this._from.setFromNetData(ds, len);
/*     */     
/*     */ 
/*  94 */     ValueEvent e = new ValueEvent(Std.getFastTime(), 
/*  95 */       this._from.getOwner(), (WObject)this._from.getOwner().getOwner(), this._from);
/*  96 */     this._from.trigger(e);
/*     */   }
/*     */   
/*     */   public String toString()
/*     */   {
/* 101 */     return super.toString() + "[forwarded from " + this._from.getName() + "]";
/*     */   }
/*     */   
/*     */   public void restoreState(Restorer r)
/*     */     throws IOException, TooNewException
/*     */   {
/* 107 */     if (!$assertionsDisabled) throw new AssertionError();
/*     */   }
/*     */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ForwardAttribute.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */