001 
002 /*
003  *  JScripter Standard 1.0 - To Script In Java
004  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.jscripter.org>
005  *  
006  *  This program is free software: you can redistribute it and/or modify
007  *  it under the terms of the GNU Affero General Public License as published by
008  *  the Free Software Foundation, either version 3 of the License, or
009  *  (at your option) any later version.
010  *  
011  *  This program is distributed in the hope that it will be useful,
012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014  *  GNU Affero General Public License for more details.
015  *  
016  *  You should have received a copy of the GNU Affero General Public License
017  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
018  */
019 
020 package js.dom;
021 
022 import js.*;
023 import js.core.*;
024 import js.user.*;
025 
026 /**
027  * <p>An <b>opaque</b> interface for DOM Level 2 CSS implementors.</p>
028  *
029  * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
030  *
031  * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
032  * generated into the target codes. Re-compilers must exit with error on the operations of
033  * accessing that kind of class objects.
034  * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
035  * and <tt>instanceof</tt> to it always <tt>true</tt>.
036  */
037 public interface DOM2CSS
038 {
039     /**
040      * <p>An <b>opaque</b> class representing the global <tt>CSSRule</tt> class of JavaScript.</p>
041      *
042      * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
043      * 
044      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
045      * generated into the target codes. Re-compilers must exit with error on the operations of
046      * accessing that kind of class objects.
047      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
048      * and <tt>instanceof</tt> to it always <tt>true</tt>.
049      */
050     public class CSSRule extends JsClass
051     {
052         /**
053          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
054          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
055          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
056          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
057          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
058          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
059          * either circumstance, the field names must be exactly same as the member names, as 
060          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
061          * based on the field names.</p>
062          *
063          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
064          * 
065          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
066          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
067          * of class objects.
068          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
069          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
070          * <pre>q.m</pre>
071          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
072          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
073          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
074          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
075          * <pre>m</pre>
076          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
077          * error on the access to <b>opaque</b> fields declared by this class under any other 
078          * circumstances.
079          */
080         public static class Member extends JsClass.Member
081         {
082             public Member(JsObject.Member q, Mid mid) {
083                 super(q, mid);
084             }
085             public Member(Mid mid) {
086                 super(mid);
087             }
088             @Override
089             /**
090              * <p>Evaluates the property, represented by the current member instance, of the
091              * argument object.</p>
092              * @param o The argument object
093              * @return The value of the current member based on the object argument.
094              * @since 1.0
095              * @javascript Re-compilers must convert the instance invocation of this method into
096              * the JavaScript expression: 
097              * <pre>o.m</pre>
098              * where <tt>m</tt> is the identifier name resolved from the current member
099              * instance of the invocation.
100              */
101             public CSSRule with(ObjectLike o) {
102                 return new CSSRule(super.with(o));
103             }
104             @Override
105             /**
106              * <p>Evaluates a property, represented by the current member instance, of the
107              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
108              * @return The value of the current member based on the JavaScript global object.
109              * @since 1.0
110              * @javascript Re-compilers must convert the instance invocation of this method into
111              * the JavaScript expression: 
112              * <pre>m</pre>
113              * where <tt>m</tt> is the identifier name resolved from the current member
114              * instance of the invocation.
115              */
116             public CSSRule with() {
117                 return with(Js.win());
118             }
119 
120             /**
121              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
122              * name of this field, qualified by the current member instance of the field, and 
123              * to access the property of the name on an object.</p>
124              * @since 1.0
125              * @javascript Re-compilers must resolve the member of this instance field to the
126              * identifier of the field name appending to the identifier resolved from its 
127              * qualifying member with a dot in between.
128              */
129             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
130         }
131 
132         /**
133          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
134          * with the wrapping constructor.</p>
135          * @param var The argument of an <b>opaque</b> object.
136          * @since 1.0
137          * @javascript Re-compilers must ignore the construction operation of this constructor,
138          * that is, replacing it with its only argument.
139          */
140         public CSSRule(JsObject var) {
141             super(var(var, (JsFunction<?>)null));
142         }
143 
144         /**
145          * <p>An <b>opaque</b> static field defining a member that is named by the field name
146          * without a qualifying member and to access the property of the name on an object.</p>
147          * @since 1.0
148          * @javascript Re-compilers must resolve the member of this static field to the
149          * identifier of the field name.
150          */
151         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
152 
153         /**
154          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
155          * class of JavaScript.</p>
156          *
157          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
158          * 
159          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
160          * generated into the target codes. Re-compilers must exit with error on the operations of
161          * accessing that kind of class objects.
162          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
163          * and <tt>instanceof</tt> to it always <tt>true</tt>.
164          */
165         public static class Prototype extends JsObject
166         {
167             /**
168              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
169              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
170              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
171              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
172              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
173              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
174              * either circumstance, the field names must be exactly same as the member names, as 
175              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
176              * based on the field names.</p>
177              *
178              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
179              * 
180              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
181              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
182              * of class objects.
183              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
184              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
185              * <pre>q.m</pre>
186              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
187              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
188              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
189              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
190              * <pre>m</pre>
191              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
192              * error on the access to <b>opaque</b> fields declared by this class under any other 
193              * circumstances.
194              */
195             public static class Member extends JsObject.Member
196             {
197                 /**
198                  * <p>Internally constructs a member based on a qualifying member.</p>
199                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
200                  * or <b>internal</b> classes or class members.</p>
201                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
202                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
203                  * declared in the declaring class of this constructor itself or its subclasses. 
204                  * Under this circumstance, the field names must be exactly same as the member 
205                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
206                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
207                  * to their names appending to the name resolved from the specified qualifying 
208                  * member with a dot in between.</p>
209                  * @param q A qualifying member
210                  * @param mid The ID of the member to construct
211                  * @since 1.0
212                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
213                  */
214                 public Member(JsObject.Member q, Mid mid) {
215                     super(q, mid);
216                 }
217                 /**
218                  * <p>Internally constructs a member without a qualifying member.</p>
219                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
220                  * or <b>internal</b> classes or class members.</p>
221                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
222                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
223                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
224                  * itself and its subclasses. Under this circumstance, the field names must be
225                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
226                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
227                  * @param mid The ID of the member to construct
228                  * @since 1.0
229                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
230                  */
231                 public Member(Mid mid) {
232                     super(mid);
233                 }
234                 @Override
235                 /**
236                  * <p>Evaluates the property, represented by the current member instance, of the
237                  * argument object.</p>
238                  * @param o The argument object
239                  * @return The value of the current member based on the object argument.
240                  * @since 1.0
241                  * @javascript Re-compilers must convert the instance invocation of this method into
242                  * the JavaScript expression: 
243                  * <pre>o.m</pre>
244                  * where <tt>m</tt> is the identifier name resolved from the current member
245                  * instance of the invocation.
246                  */
247                 public Prototype with(ObjectLike o) {
248                     return new Prototype(super.with(o));
249                 }
250 
251                 /**
252                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
253                  * name of this field, qualified by the current member instance of the field, and 
254                  * to access the property of the name on an object.</p>
255                  * @since 1.0
256                  * @see JsCSSRule#valueOf()
257                  * @javascript Re-compilers must resolve the member of this instance field to the
258                  * identifier of the field name appending to the identifier resolved from its 
259                  * qualifying member with a dot in between.
260                  */
261                 public final JsFunction.Member<JsCSSRule> valueOf = new JsFunction.Member<JsCSSRule>(this, Members.valueOf);
262             }
263 
264             /**
265              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
266              * with the wrapping constructor.</p>
267              * @param var The argument of an <b>opaque</b> object.
268              * @since 1.0
269              * @javascript Re-compilers must ignore the construction operation of this constructor,
270              * that is, replacing it with its only argument.
271              */
272             public Prototype(JsObject var) {
273                 super(var(var, (JsFunction<?>)null));
274             }
275 
276             /**
277              * <p>An <b>opaque</b> static field defining a member that is named by the field name
278              * without a qualifying member and to access the property of the name on an object.</p>
279              * @since 1.0
280              * @see JsCSSRule#valueOf()
281              * @javascript Re-compilers must resolve the member of this static field to the
282              * identifier of the field name.
283              */
284             public static final JsFunction.Member<JsCSSRule> valueOf = new JsFunction.Member<JsCSSRule>(Members.valueOf);
285         }
286     }
287 
288     /**
289      * <p>An <b>opaque</b> class representing the global <tt>CSSStyleSheet</tt> class of JavaScript.</p>
290      *
291      * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
292      * 
293      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
294      * generated into the target codes. Re-compilers must exit with error on the operations of
295      * accessing that kind of class objects.
296      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
297      * and <tt>instanceof</tt> to it always <tt>true</tt>.
298      */
299     public class CSSStyleSheet extends JsClass
300     {
301         /**
302          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
303          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
304          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
305          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
306          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
307          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
308          * either circumstance, the field names must be exactly same as the member names, as 
309          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
310          * based on the field names.</p>
311          *
312          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
313          * 
314          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
315          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
316          * of class objects.
317          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
318          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
319          * <pre>q.m</pre>
320          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
321          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
322          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
323          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
324          * <pre>m</pre>
325          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
326          * error on the access to <b>opaque</b> fields declared by this class under any other 
327          * circumstances.
328          */
329         public static class Member extends JsClass.Member
330         {
331             public Member(JsObject.Member q, Mid mid) {
332                 super(q, mid);
333             }
334             public Member(Mid mid) {
335                 super(mid);
336             }
337             @Override
338             /**
339              * <p>Evaluates the property, represented by the current member instance, of the
340              * argument object.</p>
341              * @param o The argument object
342              * @return The value of the current member based on the object argument.
343              * @since 1.0
344              * @javascript Re-compilers must convert the instance invocation of this method into
345              * the JavaScript expression: 
346              * <pre>o.m</pre>
347              * where <tt>m</tt> is the identifier name resolved from the current member
348              * instance of the invocation.
349              */
350             public CSSStyleSheet with(ObjectLike o) {
351                 return new CSSStyleSheet(super.with(o));
352             }
353             @Override
354             /**
355              * <p>Evaluates a property, represented by the current member instance, of the
356              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
357              * @return The value of the current member based on the JavaScript global object.
358              * @since 1.0
359              * @javascript Re-compilers must convert the instance invocation of this method into
360              * the JavaScript expression: 
361              * <pre>m</pre>
362              * where <tt>m</tt> is the identifier name resolved from the current member
363              * instance of the invocation.
364              */
365             public CSSStyleSheet with() {
366                 return with(Js.win());
367             }
368 
369             /**
370              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
371              * name of this field, qualified by the current member instance of the field, and 
372              * to access the property of the name on an object.</p>
373              * @since 1.0
374              * @javascript Re-compilers must resolve the member of this instance field to the
375              * identifier of the field name appending to the identifier resolved from its 
376              * qualifying member with a dot in between.
377              */
378             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
379         }
380 
381         /**
382          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
383          * with the wrapping constructor.</p>
384          * @param var The argument of an <b>opaque</b> object.
385          * @since 1.0
386          * @javascript Re-compilers must ignore the construction operation of this constructor,
387          * that is, replacing it with its only argument.
388          */
389         public CSSStyleSheet(JsObject var) {
390             super(var(var, (JsFunction<?>)null));
391         }
392 
393         /**
394          * <p>An <b>opaque</b> static field defining a member that is named by the field name
395          * without a qualifying member and to access the property of the name on an object.</p>
396          * @since 1.0
397          * @javascript Re-compilers must resolve the member of this static field to the
398          * identifier of the field name.
399          */
400         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
401 
402         /**
403          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
404          * class of JavaScript.</p>
405          *
406          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
407          * 
408          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
409          * generated into the target codes. Re-compilers must exit with error on the operations of
410          * accessing that kind of class objects.
411          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
412          * and <tt>instanceof</tt> to it always <tt>true</tt>.
413          */
414         public static class Prototype extends JsObject
415         {
416             /**
417              * <p>An <b>internal</b> class containing membership data for its enclosing
418              * opaque class.</p>
419              * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
420              * class members.</p>
421              *
422              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
423              * 
424              * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
425              */
426             protected static abstract class Members extends JsObject.Members
427             {
428                 /**
429                  * <p>An <b>internal</b> static field defining a member ID of the field name and
430                  * used internally to define a member of the same name.</p>
431                  * @since 1.0
432                  * @see DOM2CSS.CSSStyleSheet.Prototype#addRule
433                  * @see DOM2CSS.CSSStyleSheet.Prototype.Member#addRule
434                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
435                  */
436                 public final static Mid addRule    = id("addRule"   );
437                 /**
438                  * <p>An <b>internal</b> static field defining a member ID of the field name and
439                  * used internally to define a member of the same name.</p>
440                  * @since 1.0
441                  * @see DOM2CSS.CSSStyleSheet.Prototype#deleteRule
442                  * @see DOM2CSS.CSSStyleSheet.Prototype.Member#deleteRule
443                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
444                  */
445                 public final static Mid deleteRule = id("deleteRule");
446                 /**
447                  * <p>An <b>internal</b> static field defining a member ID of the field name and
448                  * used internally to define a member of the same name.</p>
449                  * @since 1.0
450                  * @see DOM2CSS.CSSStyleSheet.Prototype#insertRule
451                  * @see DOM2CSS.CSSStyleSheet.Prototype.Member#insertRule
452                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
453                  */
454                 public final static Mid insertRule = id("insertRule");
455                 /**
456                  * <p>An <b>internal</b> static field defining a member ID of the field name and
457                  * used internally to define a member of the same name.</p>
458                  * @since 1.0
459                  * @see DOM2CSS.CSSStyleSheet.Prototype#removeRule
460                  * @see DOM2CSS.CSSStyleSheet.Prototype.Member#removeRule
461                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
462                  */
463                 public final static Mid removeRule = id("removeRule");
464             }
465             /**
466              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
467              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
468              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
469              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
470              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
471              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
472              * either circumstance, the field names must be exactly same as the member names, as 
473              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
474              * based on the field names.</p>
475              *
476              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
477              * 
478              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
479              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
480              * of class objects.
481              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
482              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
483              * <pre>q.m</pre>
484              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
485              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
486              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
487              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
488              * <pre>m</pre>
489              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
490              * error on the access to <b>opaque</b> fields declared by this class under any other 
491              * circumstances.
492              */
493             public static class Member extends JsObject.Member
494             {
495                 /**
496                  * <p>Internally constructs a member based on a qualifying member.</p>
497                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
498                  * or <b>internal</b> classes or class members.</p>
499                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
500                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
501                  * declared in the declaring class of this constructor itself or its subclasses. 
502                  * Under this circumstance, the field names must be exactly same as the member 
503                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
504                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
505                  * to their names appending to the name resolved from the specified qualifying 
506                  * member with a dot in between.</p>
507                  * @param q A qualifying member
508                  * @param mid The ID of the member to construct
509                  * @since 1.0
510                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
511                  */
512                 public Member(JsObject.Member q, Mid mid) {
513                     super(q, mid);
514                 }
515                 /**
516                  * <p>Internally constructs a member without a qualifying member.</p>
517                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
518                  * or <b>internal</b> classes or class members.</p>
519                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
520                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
521                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
522                  * itself and its subclasses. Under this circumstance, the field names must be
523                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
524                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
525                  * @param mid The ID of the member to construct
526                  * @since 1.0
527                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
528                  */
529                 public Member(Mid mid) {
530                     super(mid);
531                 }
532                 @Override
533                 /**
534                  * <p>Evaluates the property, represented by the current member instance, of the
535                  * argument object.</p>
536                  * @param o The argument object
537                  * @return The value of the current member based on the object argument.
538                  * @since 1.0
539                  * @javascript Re-compilers must convert the instance invocation of this method into
540                  * the JavaScript expression: 
541                  * <pre>o.m</pre>
542                  * where <tt>m</tt> is the identifier name resolved from the current member
543                  * instance of the invocation.
544                  */
545                 public Prototype with(ObjectLike o) {
546                     return new Prototype(super.with(o));
547                 }
548 
549                 /**
550                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
551                  * name of this field, qualified by the current member instance of the field, and 
552                  * to access the property of the name on an object.</p>
553                  * @since 1.0
554                  * @see JsCSSStyleSheet#valueOf()
555                  * @javascript Re-compilers must resolve the member of this instance field to the
556                  * identifier of the field name appending to the identifier resolved from its 
557                  * qualifying member with a dot in between.
558                  */
559                 public final JsFunction.Member<JsCSSStyleSheet> valueOf = new JsFunction.Member<JsCSSStyleSheet>(this, Members.valueOf);
560                 /**
561                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
562                  * name of this field, qualified by the current member instance of the field, and 
563                  * to access the property of the name on an object.</p>
564                  * @since 1.0
565                  * @see JsCSSStyleSheet#addRule(String, String, int)
566                  * @javascript Re-compilers must resolve the member of this instance field to the
567                  * identifier of the field name appending to the identifier resolved from its 
568                  * qualifying member with a dot in between.
569                  */
570                 public final JsFunction.Member<?> addRule    = new JsFunction.Member<java.lang.Object>(this, Members.addRule   );
571                 /**
572                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
573                  * name of this field, qualified by the current member instance of the field, and 
574                  * to access the property of the name on an object.</p>
575                  * @since 1.0
576                  * @see JsCSSStyleSheet#deleteRule(long)
577                  * @javascript Re-compilers must resolve the member of this instance field to the
578                  * identifier of the field name appending to the identifier resolved from its 
579                  * qualifying member with a dot in between.
580                  */
581                 public final JsFunction.Member<?> deleteRule = new JsFunction.Member<java.lang.Object>(this, Members.deleteRule);
582                 /**
583                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
584                  * name of this field, qualified by the current member instance of the field, and 
585                  * to access the property of the name on an object.</p>
586                  * @since 1.0
587                  * @see JsCSSStyleSheet#insertRule(String, long)
588                  * @javascript Re-compilers must resolve the member of this instance field to the
589                  * identifier of the field name appending to the identifier resolved from its 
590                  * qualifying member with a dot in between.
591                  */
592                 public final JsFunction.Member<java.lang.Number> insertRule = new JsFunction.Member<java.lang.Number>(this, Members.insertRule);
593                 /**
594                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
595                  * name of this field, qualified by the current member instance of the field, and 
596                  * to access the property of the name on an object.</p>
597                  * @since 1.0
598                  * @see JsCSSStyleSheet#removeRule(int)
599                  * @javascript Re-compilers must resolve the member of this instance field to the
600                  * identifier of the field name appending to the identifier resolved from its 
601                  * qualifying member with a dot in between.
602                  */
603                 public final JsFunction.Member<?> removeRule = new JsFunction.Member<java.lang.Object>(this, Members.removeRule);
604             }
605 
606             /**
607              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
608              * with the wrapping constructor.</p>
609              * @param var The argument of an <b>opaque</b> object.
610              * @since 1.0
611              * @javascript Re-compilers must ignore the construction operation of this constructor,
612              * that is, replacing it with its only argument.
613              */
614             public Prototype(JsObject var) {
615                 super(var(var, (JsFunction<?>)null));
616             }
617 
618             /**
619              * <p>An <b>opaque</b> static field defining a member that is named by the field name
620              * without a qualifying member and to access the property of the name on an object.</p>
621              * @since 1.0
622              * @see JsCSSStyleSheet#valueOf()
623              * @javascript Re-compilers must resolve the member of this static field to the
624              * identifier of the field name.
625              */
626             public static final JsFunction.Member<JsCSSStyleSheet> valueOf = new JsFunction.Member<JsCSSStyleSheet>(Members.valueOf);
627             /**
628              * <p>An <b>opaque</b> static field defining a member that is named by the field name
629              * without a qualifying member and to access the property of the name on an object.</p>
630              * @since 1.0
631              * @see JsCSSStyleSheet#addRule(String, String, int)
632              * @javascript Re-compilers must resolve the member of this static field to the
633              * identifier of the field name.
634              */
635             public static final JsFunction.Member<?> addRule    = new JsFunction.Member<java.lang.Object>(Members.addRule   );
636             /**
637              * <p>An <b>opaque</b> static field defining a member that is named by the field name
638              * without a qualifying member and to access the property of the name on an object.</p>
639              * @since 1.0
640              * @see JsCSSStyleSheet#deleteRule(long)
641              * @javascript Re-compilers must resolve the member of this static field to the
642              * identifier of the field name.
643              */
644             public static final JsFunction.Member<?> deleteRule = new JsFunction.Member<java.lang.Object>(Members.deleteRule);
645             /**
646              * <p>An <b>opaque</b> static field defining a member that is named by the field name
647              * without a qualifying member and to access the property of the name on an object.</p>
648              * @since 1.0
649              * @see JsCSSStyleSheet#insertRule(String, long)
650              * @javascript Re-compilers must resolve the member of this static field to the
651              * identifier of the field name.
652              */
653             public static final JsFunction.Member<java.lang.Number> insertRule = new JsFunction.Member<java.lang.Number>(Members.insertRule);
654             /**
655              * <p>An <b>opaque</b> static field defining a member that is named by the field name
656              * without a qualifying member and to access the property of the name on an object.</p>
657              * @since 1.0
658              * @see JsCSSStyleSheet#removeRule(int)
659              * @javascript Re-compilers must resolve the member of this static field to the
660              * identifier of the field name.
661              */
662             public static final JsFunction.Member<?> removeRule = new JsFunction.Member<java.lang.Object>(Members.removeRule);
663         }
664     }
665 
666     public static class CSS2Properties extends JsFunction<JsCSS2Properties>
667     {
668         /**
669          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
670          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
671          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
672          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
673          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
674          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
675          * either circumstance, the field names must be exactly same as the member names, as 
676          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
677          * based on the field names.</p>
678          *
679          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
680          * 
681          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
682          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
683          * of class objects.
684          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
685          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
686          * <pre>q.m</pre>
687          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
688          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
689          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
690          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
691          * <pre>m</pre>
692          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
693          * error on the access to <b>opaque</b> fields declared by this class under any other 
694          * circumstances.
695          */
696         public static class Member extends JsFunction.Member<JsCSS2Properties>
697         {
698             public Member(JsObject.Member q, Mid mid) {
699                 super(q, mid);
700             }
701             public Member(Mid mid) {
702                 super(mid);
703             }
704             @Override
705             /**
706              * <p>Evaluates the property, represented by the current member instance, of the
707              * argument object.</p>
708              * @param o The argument object
709              * @return The value of the current member based on the object argument.
710              * @since 1.0
711              * @javascript Re-compilers must convert the instance invocation of this method into
712              * the JavaScript expression: 
713              * <pre>o.m</pre>
714              * where <tt>m</tt> is the identifier name resolved from the current member
715              * instance of the invocation.
716              */
717             public CSS2Properties with(ObjectLike o) {
718                 return new CSS2Properties(super.with(o));
719             }
720             @Override
721             /**
722              * <p>Evaluates a property, represented by the current member instance, of the
723              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
724              * @return The value of the current member based on the JavaScript global object.
725              * @since 1.0
726              * @javascript Re-compilers must convert the instance invocation of this method into
727              * the JavaScript expression: 
728              * <pre>m</pre>
729              * where <tt>m</tt> is the identifier name resolved from the current member
730              * instance of the invocation.
731              */
732             public CSS2Properties with() {
733                 return with(Js.win());
734             }
735 
736             /**
737              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
738              * name of this field, qualified by the current member instance of the field, and 
739              * to access the property of the name on an object.</p>
740              * @since 1.0
741              * @javascript Re-compilers must resolve the member of this instance field to the
742              * identifier of the field name appending to the identifier resolved from its 
743              * qualifying member with a dot in between.
744              */
745             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
746         }
747 
748         protected CSS2Properties(JsObject var) {
749             super(var(var, (JsFunction<?>)null));
750         }
751 
752         /**
753          * <p>An <b>opaque</b> static field defining a member that is named by the field name
754          * without a qualifying member and to access the property of the name on an object.</p>
755          * @since 1.0
756          * @javascript Re-compilers must resolve the member of this static field to the
757          * identifier of the field name.
758          */
759         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
760 
761         /**
762          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
763          * class of JavaScript.</p>
764          *
765          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
766          * 
767          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
768          * generated into the target codes. Re-compilers must exit with error on the operations of
769          * accessing that kind of class objects.
770          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
771          * and <tt>instanceof</tt> to it always <tt>true</tt>.
772          */
773         public static class Prototype extends JsObject
774         {
775             /**
776              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
777              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
778              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
779              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
780              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
781              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
782              * either circumstance, the field names must be exactly same as the member names, as 
783              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
784              * based on the field names.</p>
785              *
786              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
787              * 
788              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
789              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
790              * of class objects.
791              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
792              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
793              * <pre>q.m</pre>
794              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
795              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
796              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
797              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
798              * <pre>m</pre>
799              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
800              * error on the access to <b>opaque</b> fields declared by this class under any other 
801              * circumstances.
802              */
803             public static class Member extends JsObject.Member
804             {
805                 /**
806                  * <p>Internally constructs a member based on a qualifying member.</p>
807                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
808                  * or <b>internal</b> classes or class members.</p>
809                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
810                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
811                  * declared in the declaring class of this constructor itself or its subclasses. 
812                  * Under this circumstance, the field names must be exactly same as the member 
813                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
814                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
815                  * to their names appending to the name resolved from the specified qualifying 
816                  * member with a dot in between.</p>
817                  * @param q A qualifying member
818                  * @param mid The ID of the member to construct
819                  * @since 1.0
820                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
821                  */
822                 public Member(JsObject.Member q, Mid mid) {
823                     super(q, mid);
824                 }
825                 /**
826                  * <p>Internally constructs a member without a qualifying member.</p>
827                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
828                  * or <b>internal</b> classes or class members.</p>
829                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
830                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
831                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
832                  * itself and its subclasses. Under this circumstance, the field names must be
833                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
834                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
835                  * @param mid The ID of the member to construct
836                  * @since 1.0
837                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
838                  */
839                 public Member(Mid mid) {
840                     super(mid);
841                 }
842                 @Override
843                 /**
844                  * <p>Evaluates the property, represented by the current member instance, of the
845                  * argument object.</p>
846                  * @param o The argument object
847                  * @return The value of the current member based on the object argument.
848                  * @since 1.0
849                  * @javascript Re-compilers must convert the instance invocation of this method into
850                  * the JavaScript expression: 
851                  * <pre>o.m</pre>
852                  * where <tt>m</tt> is the identifier name resolved from the current member
853                  * instance of the invocation.
854                  */
855                 public Prototype with(ObjectLike o) {
856                     return new Prototype(super.with(o));
857                 }
858 
859                 /**
860                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
861                  * name of this field, qualified by the current member instance of the field, and 
862                  * to access the property of the name on an object.</p>
863                  * @since 1.0
864                  * @see JsCSS2Properties#valueOf()
865                  * @javascript Re-compilers must resolve the member of this instance field to the
866                  * identifier of the field name appending to the identifier resolved from its 
867                  * qualifying member with a dot in between.
868                  */
869                 public final JsFunction.Member<JsCSS2Properties> valueOf = new JsFunction.Member<JsCSS2Properties>(this, Members.valueOf);
870             }
871 
872             /**
873              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
874              * with the wrapping constructor.</p>
875              * @param var The argument of an <b>opaque</b> object.
876              * @since 1.0
877              * @javascript Re-compilers must ignore the construction operation of this constructor,
878              * that is, replacing it with its only argument.
879              */
880             public Prototype(JsObject var) {
881                 super(var(var, (JsFunction<?>)null));
882             }
883 
884             /**
885              * <p>An <b>opaque</b> static field defining a member that is named by the field name
886              * without a qualifying member and to access the property of the name on an object.</p>
887              * @since 1.0
888              * @see JsCSS2Properties#valueOf()
889              * @javascript Re-compilers must resolve the member of this static field to the
890              * identifier of the field name.
891              */
892             public static final JsFunction.Member<JsCSS2Properties> valueOf = new JsFunction.Member<JsCSS2Properties>(Members.valueOf);
893         }
894     }
895 }