0001 
0002 /*
0003  *  JScripter Standard 1.0 - To Script In Java
0004  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.jscripter.org>
0005  *  
0006  *  This program is free software: you can redistribute it and/or modify
0007  *  it under the terms of the GNU Affero General Public License as published by
0008  *  the Free Software Foundation, either version 3 of the License, or
0009  *  (at your option) any later version.
0010  *  
0011  *  This program is distributed in the hope that it will be useful,
0012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  *  GNU Affero General Public License for more details.
0015  *  
0016  *  You should have received a copy of the GNU Affero General Public License
0017  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0018  */
0019 
0020 package js.dom;
0021 
0022 import js.*;
0023 import js.core.*;
0024 import js.user.*;
0025 
0026 /**
0027  * <p>An <b>opaque</b> interface for DOM Level 2 Range implementors.</p>
0028  *
0029  * @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>
0030  *
0031  * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0032  * generated into the target codes. Re-compilers must exit with error on the operations of
0033  * accessing that kind of class objects.
0034  * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0035  * and <tt>instanceof</tt> to it always <tt>true</tt>.
0036  */
0037 public interface DOM2Range
0038 {
0039     /**
0040      * <p>An <b>opaque</b> class representing the global <tt>Range</tt> class of JavaScript.</p>
0041      *
0042      * @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>
0043      * 
0044      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0045      * generated into the target codes. Re-compilers must exit with error on the operations of
0046      * accessing that kind of class objects.
0047      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0048      * and <tt>instanceof</tt> to it always <tt>true</tt>.
0049      */
0050     public class Range extends JsClass
0051     {
0052         /**
0053          * <p>An <b>internal</b> class containing membership data for its enclosing
0054          * opaque class.</p>
0055          * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
0056          * class members.</p>
0057          *
0058          * @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>
0059          * 
0060          * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
0061          */
0062         protected static abstract class Members extends JsClass.Members
0063         {
0064             /**
0065              * <p>An <b>internal</b> static field defining a member ID of the field name and
0066              * used internally to define a member of the same name.</p>
0067              * @since 1.0
0068              * @see DOM2Range.Range#START_TO_START
0069              * @see DOM2Range.Range.Member#START_TO_START
0070              * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0071              */
0072             public final static Mid START_TO_START = id("START_TO_START");
0073             /**
0074              * <p>An <b>internal</b> static field defining a member ID of the field name and
0075              * used internally to define a member of the same name.</p>
0076              * @since 1.0
0077              * @see DOM2Range.Range#START_TO_END
0078              * @see DOM2Range.Range.Member#START_TO_END
0079              * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0080              */
0081             public final static Mid START_TO_END   = id("START_TO_END"  );
0082             /**
0083              * <p>An <b>internal</b> static field defining a member ID of the field name and
0084              * used internally to define a member of the same name.</p>
0085              * @since 1.0
0086              * @see DOM2Range.Range#END_TO_END
0087              * @see DOM2Range.Range.Member#END_TO_END
0088              * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0089              */
0090             public final static Mid END_TO_END     = id("END_TO_END"    );
0091             /**
0092              * <p>An <b>internal</b> static field defining a member ID of the field name and
0093              * used internally to define a member of the same name.</p>
0094              * @since 1.0
0095              * @see DOM2Range.Range#END_TO_START
0096              * @see DOM2Range.Range.Member#END_TO_START
0097              * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0098              */
0099             public final static Mid END_TO_START   = id("END_TO_START"  );
0100         }
0101 
0102         /**
0103          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0104          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0105          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0106          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0107          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0108          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0109          * either circumstance, the field names must be exactly same as the member names, as 
0110          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0111          * based on the field names.</p>
0112          *
0113          * @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>
0114          * 
0115          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0116          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0117          * of class objects.
0118          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0119          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0120          * <pre>q.m</pre>
0121          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0122          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0123          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0124          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0125          * <pre>m</pre>
0126          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0127          * error on the access to <b>opaque</b> fields declared by this class under any other 
0128          * circumstances.
0129          */
0130         public static class Member extends JsClass.Member
0131         {
0132             public Member(JsObject.Member q, Mid mid) {
0133                 super(q, mid);
0134             }
0135             public Member(Mid mid) {
0136                 super(mid);
0137             }
0138             @Override
0139             /**
0140              * <p>Evaluates the property, represented by the current member instance, of the
0141              * argument object.</p>
0142              * @param o The argument object
0143              * @return The value of the current member based on the object argument.
0144              * @since 1.0
0145              * @javascript Re-compilers must convert the instance invocation of this method into
0146              * the JavaScript expression: 
0147              * <pre>o.m</pre>
0148              * where <tt>m</tt> is the identifier name resolved from the current member
0149              * instance of the invocation.
0150              */
0151             public Range with(ObjectLike o) {
0152                 return new Range(super.with(o));
0153             }
0154             @Override
0155             /**
0156              * <p>Evaluates a property, represented by the current member instance, of the
0157              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
0158              * @return The value of the current member based on the JavaScript global object.
0159              * @since 1.0
0160              * @javascript Re-compilers must convert the instance invocation of this method into
0161              * the JavaScript expression: 
0162              * <pre>m</pre>
0163              * where <tt>m</tt> is the identifier name resolved from the current member
0164              * instance of the invocation.
0165              */
0166             public Range with() {
0167                 return with(Js.win());
0168             }
0169 
0170             /**
0171              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0172              * name of this field, qualified by the current member instance of the field, and 
0173              * to access the property of the name on an object.</p>
0174              * @since 1.0
0175              * @javascript Re-compilers must resolve the member of this instance field to the
0176              * identifier of the field name appending to the identifier resolved from its 
0177              * qualifying member with a dot in between.
0178              */
0179             public final Value.Number.Member START_TO_START = new Value.Number.Member(this, Members.START_TO_START);
0180             /**
0181              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0182              * name of this field, qualified by the current member instance of the field, and 
0183              * to access the property of the name on an object.</p>
0184              * @since 1.0
0185              * @javascript Re-compilers must resolve the member of this instance field to the
0186              * identifier of the field name appending to the identifier resolved from its 
0187              * qualifying member with a dot in between.
0188              */
0189             public final Value.Number.Member START_TO_END   = new Value.Number.Member(this, Members.START_TO_END  );
0190             /**
0191              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0192              * name of this field, qualified by the current member instance of the field, and 
0193              * to access the property of the name on an object.</p>
0194              * @since 1.0
0195              * @javascript Re-compilers must resolve the member of this instance field to the
0196              * identifier of the field name appending to the identifier resolved from its 
0197              * qualifying member with a dot in between.
0198              */
0199             public final Value.Number.Member END_TO_END     = new Value.Number.Member(this, Members.END_TO_END    );
0200             /**
0201              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0202              * name of this field, qualified by the current member instance of the field, and 
0203              * to access the property of the name on an object.</p>
0204              * @since 1.0
0205              * @javascript Re-compilers must resolve the member of this instance field to the
0206              * identifier of the field name appending to the identifier resolved from its 
0207              * qualifying member with a dot in between.
0208              */
0209             public final Value.Number.Member END_TO_START   = new Value.Number.Member(this, Members.END_TO_START  );
0210 
0211             /**
0212              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0213              * name of this field, qualified by the current member instance of the field, and 
0214              * to access the property of the name on an object.</p>
0215              * @since 1.0
0216              * @javascript Re-compilers must resolve the member of this instance field to the
0217              * identifier of the field name appending to the identifier resolved from its 
0218              * qualifying member with a dot in between.
0219              */
0220             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
0221         }
0222 
0223         /**
0224          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0225          * with the wrapping constructor.</p>
0226          * @param var The argument of an <b>opaque</b> object.
0227          * @since 1.0
0228          * @javascript Re-compilers must ignore the construction operation of this constructor,
0229          * that is, replacing it with its only argument.
0230          */
0231         public Range(JsObject var) {
0232             super(var(var, (JsFunction<?>)null));
0233         }
0234 
0235         /**
0236          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0237          * without a qualifying member and to access the property of the name on an object.</p>
0238          * @since 1.0
0239          * @javascript Re-compilers must resolve the member of this static field to the
0240          * identifier of the field name.
0241          */
0242         public static final Value.Number.Member START_TO_START = new Value.Number.Member(Members.START_TO_START);
0243         /**
0244          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0245          * without a qualifying member and to access the property of the name on an object.</p>
0246          * @since 1.0
0247          * @javascript Re-compilers must resolve the member of this static field to the
0248          * identifier of the field name.
0249          */
0250         public static final Value.Number.Member START_TO_END   = new Value.Number.Member(Members.START_TO_END  );
0251         /**
0252          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0253          * without a qualifying member and to access the property of the name on an object.</p>
0254          * @since 1.0
0255          * @javascript Re-compilers must resolve the member of this static field to the
0256          * identifier of the field name.
0257          */
0258         public static final Value.Number.Member END_TO_END     = new Value.Number.Member(Members.END_TO_END    );
0259         /**
0260          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0261          * without a qualifying member and to access the property of the name on an object.</p>
0262          * @since 1.0
0263          * @javascript Re-compilers must resolve the member of this static field to the
0264          * identifier of the field name.
0265          */
0266         public static final Value.Number.Member END_TO_START   = new Value.Number.Member(Members.END_TO_START  );
0267 
0268         /**
0269          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0270          * without a qualifying member and to access the property of the name on an object.</p>
0271          * @since 1.0
0272          * @javascript Re-compilers must resolve the member of this static field to the
0273          * identifier of the field name.
0274          */
0275         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
0276 
0277         /**
0278          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
0279          * class of JavaScript.</p>
0280          *
0281          * @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>
0282          * 
0283          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0284          * generated into the target codes. Re-compilers must exit with error on the operations of
0285          * accessing that kind of class objects.
0286          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0287          * and <tt>instanceof</tt> to it always <tt>true</tt>.
0288          */
0289         public static class Prototype extends JsObject
0290         {
0291             /**
0292              * <p>An <b>internal</b> class containing membership data for its enclosing
0293              * opaque class.</p>
0294              * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
0295              * class members.</p>
0296              *
0297              * @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>
0298              * 
0299              * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
0300              */
0301             protected static abstract class Members extends JsObject.Members
0302             {
0303                 /**
0304                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0305                  * used internally to define a member of the same name.</p>
0306                  * @since 1.0
0307                  * @see DOM2Range.Range.Prototype#cloneContents
0308                  * @see DOM2Range.Range.Prototype.Member#cloneContents
0309                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0310                  */
0311                 public final static Mid cloneContents            = id("cloneContents"           );
0312                 /**
0313                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0314                  * used internally to define a member of the same name.</p>
0315                  * @since 1.0
0316                  * @see DOM2Range.Range.Prototype#cloneRange
0317                  * @see DOM2Range.Range.Prototype.Member#cloneRange
0318                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0319                  */
0320                 public final static Mid cloneRange               = id("cloneRange"              );
0321                 /**
0322                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0323                  * used internally to define a member of the same name.</p>
0324                  * @since 1.0
0325                  * @see DOM2Range.Range.Prototype#collapse
0326                  * @see DOM2Range.Range.Prototype.Member#collapse
0327                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0328                  */
0329                 public final static Mid collapse                 = id("collapse"                );
0330                 /**
0331                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0332                  * used internally to define a member of the same name.</p>
0333                  * @since 1.0
0334                  * @see DOM2Range.Range.Prototype#createContextualFragment
0335                  * @see DOM2Range.Range.Prototype.Member#createContextualFragment
0336                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0337                  */
0338                 public final static Mid createContextualFragment = id("createContextualFragment");
0339                 /**
0340                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0341                  * used internally to define a member of the same name.</p>
0342                  * @since 1.0
0343                  * @see DOM2Range.Range.Prototype#compareBoundaryPoints
0344                  * @see DOM2Range.Range.Prototype.Member#compareBoundaryPoints
0345                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0346                  */
0347                 public final static Mid compareBoundaryPoints    = id("compareBoundaryPoints"   );
0348                 /**
0349                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0350                  * used internally to define a member of the same name.</p>
0351                  * @since 1.0
0352                  * @see DOM2Range.Range.Prototype#deleteContents
0353                  * @see DOM2Range.Range.Prototype.Member#deleteContents
0354                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0355                  */
0356                 public final static Mid deleteContents           = id("deleteContents"          );
0357                 /**
0358                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0359                  * used internally to define a member of the same name.</p>
0360                  * @since 1.0
0361                  * @see DOM2Range.Range.Prototype#detach
0362                  * @see DOM2Range.Range.Prototype.Member#detach
0363                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0364                  */
0365                 public final static Mid detach                   = id("detach"                  );
0366                 /**
0367                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0368                  * used internally to define a member of the same name.</p>
0369                  * @since 1.0
0370                  * @see DOM2Range.Range.Prototype#extractContents
0371                  * @see DOM2Range.Range.Prototype.Member#extractContents
0372                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0373                  */
0374                 public final static Mid extractContents          = id("extractContents"         );
0375                 /**
0376                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0377                  * used internally to define a member of the same name.</p>
0378                  * @since 1.0
0379                  * @see DOM2Range.Range.Prototype#insertNode
0380                  * @see DOM2Range.Range.Prototype.Member#insertNode
0381                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0382                  */
0383                 public final static Mid insertNode               = id("insertNode"              );
0384                 /**
0385                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0386                  * used internally to define a member of the same name.</p>
0387                  * @since 1.0
0388                  * @see DOM2Range.Range.Prototype#selectNode
0389                  * @see DOM2Range.Range.Prototype.Member#selectNode
0390                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0391                  */
0392                 public final static Mid selectNode               = id("selectNode"              );
0393                 /**
0394                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0395                  * used internally to define a member of the same name.</p>
0396                  * @since 1.0
0397                  * @see DOM2Range.Range.Prototype#selectNodeContents
0398                  * @see DOM2Range.Range.Prototype.Member#selectNodeContents
0399                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0400                  */
0401                 public final static Mid selectNodeContents       = id("selectNodeContents"      );
0402                 /**
0403                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0404                  * used internally to define a member of the same name.</p>
0405                  * @since 1.0
0406                  * @see DOM2Range.Range.Prototype#setEnd
0407                  * @see DOM2Range.Range.Prototype.Member#setEnd
0408                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0409                  */
0410                 public final static Mid setEnd                   = id("setEnd"                  );
0411                 /**
0412                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0413                  * used internally to define a member of the same name.</p>
0414                  * @since 1.0
0415                  * @see DOM2Range.Range.Prototype#setEndAfter
0416                  * @see DOM2Range.Range.Prototype.Member#setEndAfter
0417                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0418                  */
0419                 public final static Mid setEndAfter              = id("setEndAfter"             );
0420                 /**
0421                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0422                  * used internally to define a member of the same name.</p>
0423                  * @since 1.0
0424                  * @see DOM2Range.Range.Prototype#setEndBefore
0425                  * @see DOM2Range.Range.Prototype.Member#setEndBefore
0426                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0427                  */
0428                 public final static Mid setEndBefore             = id("setEndBefore"            );
0429                 /**
0430                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0431                  * used internally to define a member of the same name.</p>
0432                  * @since 1.0
0433                  * @see DOM2Range.Range.Prototype#setStart
0434                  * @see DOM2Range.Range.Prototype.Member#setStart
0435                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0436                  */
0437                 public final static Mid setStart                 = id("setStart"                );
0438                 /**
0439                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0440                  * used internally to define a member of the same name.</p>
0441                  * @since 1.0
0442                  * @see DOM2Range.Range.Prototype#setStartAfter
0443                  * @see DOM2Range.Range.Prototype.Member#setStartAfter
0444                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0445                  */
0446                 public final static Mid setStartAfter            = id("setStartAfter"           );
0447                 /**
0448                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0449                  * used internally to define a member of the same name.</p>
0450                  * @since 1.0
0451                  * @see DOM2Range.Range.Prototype#setStartBefore
0452                  * @see DOM2Range.Range.Prototype.Member#setStartBefore
0453                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0454                  */
0455                 public final static Mid setStartBefore           = id("setStartBefore"          );
0456                 /**
0457                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0458                  * used internally to define a member of the same name.</p>
0459                  * @since 1.0
0460                  * @see DOM2Range.Range.Prototype#surroundContents
0461                  * @see DOM2Range.Range.Prototype.Member#surroundContents
0462                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0463                  */
0464                 public final static Mid surroundContents         = id("surroundContents"        );
0465             }
0466             /**
0467              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0468              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0469              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0470              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0471              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0472              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0473              * either circumstance, the field names must be exactly same as the member names, as 
0474              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0475              * based on the field names.</p>
0476              *
0477              * @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>
0478              * 
0479              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0480              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0481              * of class objects.
0482              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0483              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0484              * <pre>q.m</pre>
0485              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0486              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0487              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0488              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0489              * <pre>m</pre>
0490              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0491              * error on the access to <b>opaque</b> fields declared by this class under any other 
0492              * circumstances.
0493              */
0494             public static class Member extends JsObject.Member
0495             {
0496                 /**
0497                  * <p>Internally constructs a member based on a qualifying member.</p>
0498                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0499                  * or <b>internal</b> classes or class members.</p>
0500                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0501                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
0502                  * declared in the declaring class of this constructor itself or its subclasses. 
0503                  * Under this circumstance, the field names must be exactly same as the member 
0504                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
0505                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
0506                  * to their names appending to the name resolved from the specified qualifying 
0507                  * member with a dot in between.</p>
0508                  * @param q A qualifying member
0509                  * @param mid The ID of the member to construct
0510                  * @since 1.0
0511                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0512                  */
0513                 public Member(JsObject.Member q, Mid mid) {
0514                     super(q, mid);
0515                 }
0516                 /**
0517                  * <p>Internally constructs a member without a qualifying member.</p>
0518                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0519                  * or <b>internal</b> classes or class members.</p>
0520                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0521                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
0522                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
0523                  * itself and its subclasses. Under this circumstance, the field names must be
0524                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
0525                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
0526                  * @param mid The ID of the member to construct
0527                  * @since 1.0
0528                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0529                  */
0530                 public Member(Mid mid) {
0531                     super(mid);
0532                 }
0533                 @Override
0534                 /**
0535                  * <p>Evaluates the property, represented by the current member instance, of the
0536                  * argument object.</p>
0537                  * @param o The argument object
0538                  * @return The value of the current member based on the object argument.
0539                  * @since 1.0
0540                  * @javascript Re-compilers must convert the instance invocation of this method into
0541                  * the JavaScript expression: 
0542                  * <pre>o.m</pre>
0543                  * where <tt>m</tt> is the identifier name resolved from the current member
0544                  * instance of the invocation.
0545                  */
0546                 public Prototype with(ObjectLike o) {
0547                     return new Prototype(super.with(o));
0548                 }
0549 
0550                 /**
0551                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0552                  * name of this field, qualified by the current member instance of the field, and 
0553                  * to access the property of the name on an object.</p>
0554                  * @since 1.0
0555                  * @see JsRange#valueOf()
0556                  * @javascript Re-compilers must resolve the member of this instance field to the
0557                  * identifier of the field name appending to the identifier resolved from its 
0558                  * qualifying member with a dot in between.
0559                  */
0560                 public final JsFunction.Member<JsRange> valueOf = new JsFunction.Member<JsRange>(this, Members.valueOf);
0561                 /**
0562                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0563                  * name of this field, qualified by the current member instance of the field, and 
0564                  * to access the property of the name on an object.</p>
0565                  * @since 1.0
0566                  * @see JsRange#collapse(Boolean)
0567                  * @javascript Re-compilers must resolve the member of this instance field to the
0568                  * identifier of the field name appending to the identifier resolved from its 
0569                  * qualifying member with a dot in between.
0570                  */
0571                 public final JsFunction.Member<?> collapse           = new JsFunction.Member<java.lang.Object>(this, Members.collapse          );
0572                 /**
0573                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0574                  * name of this field, qualified by the current member instance of the field, and 
0575                  * to access the property of the name on an object.</p>
0576                  * @since 1.0
0577                  * @see JsRange#deleteContents()
0578                  * @javascript Re-compilers must resolve the member of this instance field to the
0579                  * identifier of the field name appending to the identifier resolved from its 
0580                  * qualifying member with a dot in between.
0581                  */
0582                 public final JsFunction.Member<?> deleteContents     = new JsFunction.Member<java.lang.Object>(this, Members.deleteContents    );
0583                 /**
0584                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0585                  * name of this field, qualified by the current member instance of the field, and 
0586                  * to access the property of the name on an object.</p>
0587                  * @since 1.0
0588                  * @see JsRange#detach()
0589                  * @javascript Re-compilers must resolve the member of this instance field to the
0590                  * identifier of the field name appending to the identifier resolved from its 
0591                  * qualifying member with a dot in between.
0592                  */
0593                 public final JsFunction.Member<?> detach             = new JsFunction.Member<java.lang.Object>(this, Members.detach            );
0594                 /**
0595                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0596                  * name of this field, qualified by the current member instance of the field, and 
0597                  * to access the property of the name on an object.</p>
0598                  * @since 1.0
0599                  * @see JsRange#insertNode(JsNode)
0600                  * @javascript Re-compilers must resolve the member of this instance field to the
0601                  * identifier of the field name appending to the identifier resolved from its 
0602                  * qualifying member with a dot in between.
0603                  */
0604                 public final JsFunction.Member<?> insertNode         = new JsFunction.Member<java.lang.Object>(this, Members.insertNode        );
0605                 /**
0606                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0607                  * name of this field, qualified by the current member instance of the field, and 
0608                  * to access the property of the name on an object.</p>
0609                  * @since 1.0
0610                  * @see JsRange#selectNode(JsNode)
0611                  * @javascript Re-compilers must resolve the member of this instance field to the
0612                  * identifier of the field name appending to the identifier resolved from its 
0613                  * qualifying member with a dot in between.
0614                  */
0615                 public final JsFunction.Member<?> selectNode         = new JsFunction.Member<java.lang.Object>(this, Members.selectNode        );
0616                 /**
0617                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0618                  * name of this field, qualified by the current member instance of the field, and 
0619                  * to access the property of the name on an object.</p>
0620                  * @since 1.0
0621                  * @see JsRange#selectNodeContents(JsNode)
0622                  * @javascript Re-compilers must resolve the member of this instance field to the
0623                  * identifier of the field name appending to the identifier resolved from its 
0624                  * qualifying member with a dot in between.
0625                  */
0626                 public final JsFunction.Member<?> selectNodeContents = new JsFunction.Member<java.lang.Object>(this, Members.selectNodeContents);
0627                 /**
0628                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0629                  * name of this field, qualified by the current member instance of the field, and 
0630                  * to access the property of the name on an object.</p>
0631                  * @since 1.0
0632                  * @see JsRange#setEnd(JsNode, Number)
0633                  * @javascript Re-compilers must resolve the member of this instance field to the
0634                  * identifier of the field name appending to the identifier resolved from its 
0635                  * qualifying member with a dot in between.
0636                  */
0637                 public final JsFunction.Member<?> setEnd             = new JsFunction.Member<java.lang.Object>(this, Members.setEnd            );
0638                 /**
0639                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0640                  * name of this field, qualified by the current member instance of the field, and 
0641                  * to access the property of the name on an object.</p>
0642                  * @since 1.0
0643                  * @see JsRange#setEndAfter(JsNode)
0644                  * @javascript Re-compilers must resolve the member of this instance field to the
0645                  * identifier of the field name appending to the identifier resolved from its 
0646                  * qualifying member with a dot in between.
0647                  */
0648                 public final JsFunction.Member<?> setEndAfter        = new JsFunction.Member<java.lang.Object>(this, Members.setEndAfter       );
0649                 /**
0650                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0651                  * name of this field, qualified by the current member instance of the field, and 
0652                  * to access the property of the name on an object.</p>
0653                  * @since 1.0
0654                  * @see JsRange#setEndBefore(JsNode)
0655                  * @javascript Re-compilers must resolve the member of this instance field to the
0656                  * identifier of the field name appending to the identifier resolved from its 
0657                  * qualifying member with a dot in between.
0658                  */
0659                 public final JsFunction.Member<?> setEndBefore       = new JsFunction.Member<java.lang.Object>(this, Members.setEndBefore      );
0660                 /**
0661                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0662                  * name of this field, qualified by the current member instance of the field, and 
0663                  * to access the property of the name on an object.</p>
0664                  * @since 1.0
0665                  * @see JsRange#setStart(JsNode, Number)
0666                  * @javascript Re-compilers must resolve the member of this instance field to the
0667                  * identifier of the field name appending to the identifier resolved from its 
0668                  * qualifying member with a dot in between.
0669                  */
0670                 public final JsFunction.Member<?> setStart           = new JsFunction.Member<java.lang.Object>(this, Members.setStart          );
0671                 /**
0672                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0673                  * name of this field, qualified by the current member instance of the field, and 
0674                  * to access the property of the name on an object.</p>
0675                  * @since 1.0
0676                  * @see JsRange#setStartAfter(JsNode)
0677                  * @javascript Re-compilers must resolve the member of this instance field to the
0678                  * identifier of the field name appending to the identifier resolved from its 
0679                  * qualifying member with a dot in between.
0680                  */
0681                 public final JsFunction.Member<?> setStartAfter      = new JsFunction.Member<java.lang.Object>(this, Members.setStartAfter     );
0682                 /**
0683                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0684                  * name of this field, qualified by the current member instance of the field, and 
0685                  * to access the property of the name on an object.</p>
0686                  * @since 1.0
0687                  * @see JsRange#setStartBefore(JsNode)
0688                  * @javascript Re-compilers must resolve the member of this instance field to the
0689                  * identifier of the field name appending to the identifier resolved from its 
0690                  * qualifying member with a dot in between.
0691                  */
0692                 public final JsFunction.Member<?> setStartBefore     = new JsFunction.Member<java.lang.Object>(this, Members.setStartBefore    );
0693                 /**
0694                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0695                  * name of this field, qualified by the current member instance of the field, and 
0696                  * to access the property of the name on an object.</p>
0697                  * @since 1.0
0698                  * @see JsRange#surroundContents(JsNode)
0699                  * @javascript Re-compilers must resolve the member of this instance field to the
0700                  * identifier of the field name appending to the identifier resolved from its 
0701                  * qualifying member with a dot in between.
0702                  */
0703                 public final JsFunction.Member<?> surroundContents   = new JsFunction.Member<java.lang.Object>(this, Members.surroundContents  );
0704                 /**
0705                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0706                  * name of this field, qualified by the current member instance of the field, and 
0707                  * to access the property of the name on an object.</p>
0708                  * @since 1.0
0709                  * @see JsRange#cloneRange()
0710                  * @javascript Re-compilers must resolve the member of this instance field to the
0711                  * identifier of the field name appending to the identifier resolved from its 
0712                  * qualifying member with a dot in between.
0713                  */
0714                 public final JsFunction.Member<JsRange> cloneRange = new JsFunction.Member<JsRange>(this, Members.cloneRange);
0715                 /**
0716                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0717                  * name of this field, qualified by the current member instance of the field, and 
0718                  * to access the property of the name on an object.</p>
0719                  * @since 1.0
0720                  * @see JsRange#compareBoundaryPoints(Number, JsRange)
0721                  * @javascript Re-compilers must resolve the member of this instance field to the
0722                  * identifier of the field name appending to the identifier resolved from its 
0723                  * qualifying member with a dot in between.
0724                  */
0725                 public final JsFunction.Member<java.lang.Number> compareBoundaryPoints = new JsFunction.Member<java.lang.Number>(this, Members.compareBoundaryPoints);
0726                 /**
0727                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0728                  * name of this field, qualified by the current member instance of the field, and 
0729                  * to access the property of the name on an object.</p>
0730                  * @since 1.0
0731                  * @see JsRange#createContextualFragment(String)
0732                  * @javascript Re-compilers must resolve the member of this instance field to the
0733                  * identifier of the field name appending to the identifier resolved from its 
0734                  * qualifying member with a dot in between.
0735                  */
0736                 public final JsFunction.Member<JsNode> createContextualFragment = new JsFunction.Member<JsNode>(this, Members.createContextualFragment);
0737                 /**
0738                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0739                  * name of this field, qualified by the current member instance of the field, and 
0740                  * to access the property of the name on an object.</p>
0741                  * @since 1.0
0742                  * @see JsRange#cloneContents()
0743                  * @javascript Re-compilers must resolve the member of this instance field to the
0744                  * identifier of the field name appending to the identifier resolved from its 
0745                  * qualifying member with a dot in between.
0746                  */
0747                 public final JsFunction.Member<JsDocumentFragment> cloneContents   = new JsFunction.Member<JsDocumentFragment>(this, Members.cloneContents  );
0748                 /**
0749                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0750                  * name of this field, qualified by the current member instance of the field, and 
0751                  * to access the property of the name on an object.</p>
0752                  * @since 1.0
0753                  * @see JsRange#extractContents()
0754                  * @javascript Re-compilers must resolve the member of this instance field to the
0755                  * identifier of the field name appending to the identifier resolved from its 
0756                  * qualifying member with a dot in between.
0757                  */
0758                 public final JsFunction.Member<JsDocumentFragment> extractContents = new JsFunction.Member<JsDocumentFragment>(this, Members.extractContents);
0759             }
0760 
0761             /**
0762              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0763              * with the wrapping constructor.</p>
0764              * @param var The argument of an <b>opaque</b> object.
0765              * @since 1.0
0766              * @javascript Re-compilers must ignore the construction operation of this constructor,
0767              * that is, replacing it with its only argument.
0768              */
0769             public Prototype(JsObject var) {
0770                 super(var(var, (JsFunction<?>)null));
0771             }
0772 
0773             /**
0774              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0775              * without a qualifying member and to access the property of the name on an object.</p>
0776              * @since 1.0
0777              * @see JsRange#valueOf()
0778              * @javascript Re-compilers must resolve the member of this static field to the
0779              * identifier of the field name.
0780              */
0781             public static final JsFunction.Member<JsRange> valueOf = new JsFunction.Member<JsRange>(Members.valueOf);
0782             /**
0783              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0784              * without a qualifying member and to access the property of the name on an object.</p>
0785              * @since 1.0
0786              * @see JsRange#collapse(Boolean)
0787              * @javascript Re-compilers must resolve the member of this static field to the
0788              * identifier of the field name.
0789              */
0790             public static final JsFunction.Member<?> collapse           = new JsFunction.Member<java.lang.Object>(Members.collapse          );
0791             /**
0792              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0793              * without a qualifying member and to access the property of the name on an object.</p>
0794              * @since 1.0
0795              * @see JsRange#deleteContents()
0796              * @javascript Re-compilers must resolve the member of this static field to the
0797              * identifier of the field name.
0798              */
0799             public static final JsFunction.Member<?> deleteContents     = new JsFunction.Member<java.lang.Object>(Members.deleteContents    );
0800             /**
0801              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0802              * without a qualifying member and to access the property of the name on an object.</p>
0803              * @since 1.0
0804              * @see JsRange#detach()
0805              * @javascript Re-compilers must resolve the member of this static field to the
0806              * identifier of the field name.
0807              */
0808             public static final JsFunction.Member<?> detach             = new JsFunction.Member<java.lang.Object>(Members.detach            );
0809             /**
0810              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0811              * without a qualifying member and to access the property of the name on an object.</p>
0812              * @since 1.0
0813              * @see JsRange#insertNode(JsNode)
0814              * @javascript Re-compilers must resolve the member of this static field to the
0815              * identifier of the field name.
0816              */
0817             public static final JsFunction.Member<?> insertNode         = new JsFunction.Member<java.lang.Object>(Members.insertNode        );
0818             /**
0819              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0820              * without a qualifying member and to access the property of the name on an object.</p>
0821              * @since 1.0
0822              * @see JsRange#selectNode(JsNode)
0823              * @javascript Re-compilers must resolve the member of this static field to the
0824              * identifier of the field name.
0825              */
0826             public static final JsFunction.Member<?> selectNode         = new JsFunction.Member<java.lang.Object>(Members.selectNode        );
0827             /**
0828              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0829              * without a qualifying member and to access the property of the name on an object.</p>
0830              * @since 1.0
0831              * @see JsRange#selectNodeContents(JsNode)
0832              * @javascript Re-compilers must resolve the member of this static field to the
0833              * identifier of the field name.
0834              */
0835             public static final JsFunction.Member<?> selectNodeContents = new JsFunction.Member<java.lang.Object>(Members.selectNodeContents);
0836             /**
0837              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0838              * without a qualifying member and to access the property of the name on an object.</p>
0839              * @since 1.0
0840              * @see JsRange#setEnd(JsNode, Number)
0841              * @javascript Re-compilers must resolve the member of this static field to the
0842              * identifier of the field name.
0843              */
0844             public static final JsFunction.Member<?> setEnd             = new JsFunction.Member<java.lang.Object>(Members.setEnd            );
0845             /**
0846              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0847              * without a qualifying member and to access the property of the name on an object.</p>
0848              * @since 1.0
0849              * @see JsRange#setEndAfter(JsNode)
0850              * @javascript Re-compilers must resolve the member of this static field to the
0851              * identifier of the field name.
0852              */
0853             public static final JsFunction.Member<?> setEndAfter        = new JsFunction.Member<java.lang.Object>(Members.setEndAfter       );
0854             /**
0855              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0856              * without a qualifying member and to access the property of the name on an object.</p>
0857              * @since 1.0
0858              * @see JsRange#setEndBefore(JsNode)
0859              * @javascript Re-compilers must resolve the member of this static field to the
0860              * identifier of the field name.
0861              */
0862             public static final JsFunction.Member<?> setEndBefore       = new JsFunction.Member<java.lang.Object>(Members.setEndBefore      );
0863             /**
0864              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0865              * without a qualifying member and to access the property of the name on an object.</p>
0866              * @since 1.0
0867              * @see JsRange#setStart(JsNode, Number)
0868              * @javascript Re-compilers must resolve the member of this static field to the
0869              * identifier of the field name.
0870              */
0871             public static final JsFunction.Member<?> setStart           = new JsFunction.Member<java.lang.Object>(Members.setStart          );
0872             /**
0873              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0874              * without a qualifying member and to access the property of the name on an object.</p>
0875              * @since 1.0
0876              * @see JsRange#setStartAfter(JsNode)
0877              * @javascript Re-compilers must resolve the member of this static field to the
0878              * identifier of the field name.
0879              */
0880             public static final JsFunction.Member<?> setStartAfter      = new JsFunction.Member<java.lang.Object>(Members.setStartAfter     );
0881             /**
0882              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0883              * without a qualifying member and to access the property of the name on an object.</p>
0884              * @since 1.0
0885              * @see JsRange#setStartBefore(JsNode)
0886              * @javascript Re-compilers must resolve the member of this static field to the
0887              * identifier of the field name.
0888              */
0889             public static final JsFunction.Member<?> setStartBefore     = new JsFunction.Member<java.lang.Object>(Members.setStartBefore    );
0890             /**
0891              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0892              * without a qualifying member and to access the property of the name on an object.</p>
0893              * @since 1.0
0894              * @see JsRange#surroundContents(JsNode)
0895              * @javascript Re-compilers must resolve the member of this static field to the
0896              * identifier of the field name.
0897              */
0898             public static final JsFunction.Member<?> surroundContents   = new JsFunction.Member<java.lang.Object>(Members.surroundContents  );
0899             /**
0900              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0901              * without a qualifying member and to access the property of the name on an object.</p>
0902              * @since 1.0
0903              * @see JsRange#cloneRange()
0904              * @javascript Re-compilers must resolve the member of this static field to the
0905              * identifier of the field name.
0906              */
0907             public static final JsFunction.Member<JsRange> cloneRange = new JsFunction.Member<JsRange>(Members.cloneRange);
0908             /**
0909              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0910              * without a qualifying member and to access the property of the name on an object.</p>
0911              * @since 1.0
0912              * @see JsRange#compareBoundaryPoints(Number, JsRange)
0913              * @javascript Re-compilers must resolve the member of this static field to the
0914              * identifier of the field name.
0915              */
0916             public static final JsFunction.Member<java.lang.Number> compareBoundaryPoints = new JsFunction.Member<java.lang.Number>(Members.compareBoundaryPoints);
0917             /**
0918              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0919              * without a qualifying member and to access the property of the name on an object.</p>
0920              * @since 1.0
0921              * @see JsRange#createContextualFragment(String)
0922              * @javascript Re-compilers must resolve the member of this static field to the
0923              * identifier of the field name.
0924              */
0925             public static final JsFunction.Member<JsNode> createContextualFragment = new JsFunction.Member<JsNode>(Members.createContextualFragment);
0926             /**
0927              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0928              * without a qualifying member and to access the property of the name on an object.</p>
0929              * @since 1.0
0930              * @see JsRange#cloneContents()
0931              * @javascript Re-compilers must resolve the member of this static field to the
0932              * identifier of the field name.
0933              */
0934             public static final JsFunction.Member<JsDocumentFragment> cloneContents   = new JsFunction.Member<JsDocumentFragment>(Members.cloneContents  );
0935             /**
0936              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0937              * without a qualifying member and to access the property of the name on an object.</p>
0938              * @since 1.0
0939              * @see JsRange#extractContents()
0940              * @javascript Re-compilers must resolve the member of this static field to the
0941              * identifier of the field name.
0942              */
0943             public static final JsFunction.Member<JsDocumentFragment> extractContents = new JsFunction.Member<JsDocumentFragment>(Members.extractContents);
0944         }
0945     }
0946 
0947     /**
0948      * <p>An <b>opaque</b> class representing the global <tt>RangeException</tt> class of JavaScript.</p>
0949      *
0950      * @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>
0951      * 
0952      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0953      * generated into the target codes. Re-compilers must exit with error on the operations of
0954      * accessing that kind of class objects.
0955      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0956      * and <tt>instanceof</tt> to it always <tt>true</tt>.
0957      */
0958     public class RangeException extends JsClass
0959     {
0960         /**
0961          * <p>An <b>internal</b> class containing membership data for its enclosing 
0962          * opaque class.</p>
0963          * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or 
0964          * class members.</p>
0965          *
0966          * @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>
0967          * 
0968          * @javascript Re-compilers must report error on resolving an <b>internal</b> class. 
0969          */
0970         protected static abstract class Members extends JsClass.Members
0971         {
0972             /**
0973              * <p>An <b>internal</b> static field defining a member ID of the field name and 
0974              * used internally to define a member of the same name.</p>
0975              * @since 1.0
0976              * @see DOM2Range.RangeException#BAD_BOUNDARYPOINTS_ERR
0977              * @see DOM2Range.RangeException.Member#BAD_BOUNDARYPOINTS_ERR
0978              * @javascript Re-compilers must report error on accessing an <b>internal</b> field. 
0979              */
0980             public final static Mid BAD_BOUNDARYPOINTS_ERR = id("BAD_BOUNDARYPOINTS_ERR");
0981             /**
0982              * <p>An <b>internal</b> static field defining a member ID of the field name and 
0983              * used internally to define a member of the same name.</p>
0984              * @since 1.0
0985              * @see DOM2Range.RangeException#INVALID_NODE_TYPE_ERR
0986              * @see DOM2Range.RangeException.Member#INVALID_NODE_TYPE_ERR
0987              * @javascript Re-compilers must report error on accessing an <b>internal</b> field. 
0988              */
0989             public final static Mid INVALID_NODE_TYPE_ERR = id("INVALID_NODE_TYPE_ERR");
0990         }
0991         /**
0992          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0993          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0994          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0995          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0996          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0997          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0998          * either circumstance, the field names must be exactly same as the member names, as 
0999          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
1000          * based on the field names.</p>
1001          *
1002          * @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>
1003          * 
1004          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
1005          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
1006          * of class objects.
1007          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
1008          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
1009          * <pre>q.m</pre>
1010          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
1011          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
1012          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
1013          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
1014          * <pre>m</pre>
1015          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
1016          * error on the access to <b>opaque</b> fields declared by this class under any other 
1017          * circumstances.
1018          */
1019         public static class Member extends JsClass.Member
1020         {
1021             public Member(JsObject.Member q, Mid mid) {
1022                 super(q, mid);
1023             }
1024             public Member(Mid mid) {
1025                 super(mid);
1026             }
1027             @Override
1028             /**
1029              * <p>Evaluates the property, represented by the current member instance, of the
1030              * argument object.</p>
1031              * @param o The argument object
1032              * @return The value of the current member based on the object argument.
1033              * @since 1.0
1034              * @javascript Re-compilers must convert the instance invocation of this method into
1035              * the JavaScript expression: 
1036              * <pre>o.m</pre>
1037              * where <tt>m</tt> is the identifier name resolved from the current member
1038              * instance of the invocation.
1039              */
1040             public RangeException with(ObjectLike o) {
1041                 return new RangeException(super.with(o));
1042             }
1043             @Override
1044             /**
1045              * <p>Evaluates a property, represented by the current member instance, of the
1046              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
1047              * @return The value of the current member based on the JavaScript global object.
1048              * @since 1.0
1049              * @javascript Re-compilers must convert the instance invocation of this method into
1050              * the JavaScript expression: 
1051              * <pre>m</pre>
1052              * where <tt>m</tt> is the identifier name resolved from the current member
1053              * instance of the invocation.
1054              */
1055             public RangeException with() {
1056                 return with(Js.win());
1057             }
1058 
1059             /**
1060              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
1061              * name of this field, qualified by the current member instance of the field, and 
1062              * to access the property of the name on an object.</p>
1063              * @since 1.0
1064              * @javascript Re-compilers must resolve the member of this instance field to the
1065              * identifier of the field name appending to the identifier resolved from its 
1066              * qualifying member with a dot in between.
1067              */
1068             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
1069             /**
1070              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
1071              * name of this field, qualified by the current member instance of the field, and 
1072              * to access the property of the name on an object.</p>
1073              * @since 1.0
1074              * @see JsRangeException#BAD_BOUNDARYPOINTS_ERR
1075              * @javascript Re-compilers must resolve the member of this instance field to the
1076              * identifier of the field name appending to the identifier resolved from its 
1077              * qualifying member with a dot in between.
1078              */
1079             public final Value.Short.Member BAD_BOUNDARYPOINTS_ERR = new Value.Short.Member(this, Members.BAD_BOUNDARYPOINTS_ERR);
1080             /**
1081              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
1082              * name of this field, qualified by the current member instance of the field, and 
1083              * to access the property of the name on an object.</p>
1084              * @since 1.0
1085              * @see JsRangeException#INVALID_NODE_TYPE_ERR
1086              * @javascript Re-compilers must resolve the member of this instance field to the
1087              * identifier of the field name appending to the identifier resolved from its 
1088              * qualifying member with a dot in between.
1089              */
1090             public final Value.Short.Member INVALID_NODE_TYPE_ERR = new Value.Short.Member(this, Members.INVALID_NODE_TYPE_ERR);
1091         }
1092 
1093         /**
1094          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
1095          * with the wrapping constructor.</p>
1096          * @param var The argument of an <b>opaque</b> object.
1097          * @since 1.0
1098          * @javascript Re-compilers must ignore the construction operation of this constructor,
1099          * that is, replacing it with its only argument.
1100          */
1101         public RangeException(JsObject var) {
1102             super(var(var, (JsFunction<?>)null));
1103         }
1104 
1105         /**
1106          * <p>An <b>opaque</b> static field defining a member that is named by the field name
1107          * without a qualifying member and to access the property of the name on an object.</p>
1108          * @since 1.0
1109          * @javascript Re-compilers must resolve the member of this static field to the
1110          * identifier of the field name.
1111          */
1112         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
1113         /**
1114          * <p>An <b>opaque</b> static field defining a member that is named by the field name
1115          * without a qualifying member and to access the property of the name on an object.</p>
1116          * @since 1.0
1117          * @see JsRangeException#BAD_BOUNDARYPOINTS_ERR
1118          * @javascript Re-compilers must resolve the member of this static field to the
1119          * identifier of the field name.
1120          */
1121         public static final Value.Short.Member BAD_BOUNDARYPOINTS_ERR = new Value.Short.Member(Members.BAD_BOUNDARYPOINTS_ERR);
1122         /**
1123          * <p>An <b>opaque</b> static field defining a member that is named by the field name
1124          * without a qualifying member and to access the property of the name on an object.</p>
1125          * @since 1.0
1126          * @see JsRangeException#INVALID_NODE_TYPE_ERR
1127          * @javascript Re-compilers must resolve the member of this static field to the
1128          * identifier of the field name.
1129          */
1130         public static final Value.Short.Member INVALID_NODE_TYPE_ERR = new Value.Short.Member(Members.INVALID_NODE_TYPE_ERR);
1131 
1132         /**
1133          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
1134          * class of JavaScript.</p>
1135          *
1136          * @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>
1137          * 
1138          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
1139          * generated into the target codes. Re-compilers must exit with error on the operations of
1140          * accessing that kind of class objects.
1141          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
1142          * and <tt>instanceof</tt> to it always <tt>true</tt>.
1143          */
1144         public static class Prototype extends JsObject
1145         {
1146             /**
1147              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
1148              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
1149              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
1150              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
1151              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
1152              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
1153              * either circumstance, the field names must be exactly same as the member names, as 
1154              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
1155              * based on the field names.</p>
1156              *
1157              * @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>
1158              * 
1159              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
1160              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
1161              * of class objects.
1162              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
1163              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
1164              * <pre>q.m</pre>
1165              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
1166              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
1167              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
1168              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
1169              * <pre>m</pre>
1170              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
1171              * error on the access to <b>opaque</b> fields declared by this class under any other 
1172              * circumstances.
1173              */
1174             public static class Member extends JsObject.Member
1175             {
1176                 /**
1177                  * <p>Internally constructs a member based on a qualifying member.</p>
1178                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
1179                  * or <b>internal</b> classes or class members.</p>
1180                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
1181                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
1182                  * declared in the declaring class of this constructor itself or its subclasses. 
1183                  * Under this circumstance, the field names must be exactly same as the member 
1184                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
1185                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
1186                  * to their names appending to the name resolved from the specified qualifying 
1187                  * member with a dot in between.</p>
1188                  * @param q A qualifying member
1189                  * @param mid The ID of the member to construct
1190                  * @since 1.0
1191                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
1192                  */
1193                 public Member(JsObject.Member q, Mid mid) {
1194                     super(q, mid);
1195                 }
1196                 /**
1197                  * <p>Internally constructs a member without a qualifying member.</p>
1198                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
1199                  * or <b>internal</b> classes or class members.</p>
1200                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
1201                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
1202                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
1203                  * itself and its subclasses. Under this circumstance, the field names must be
1204                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
1205                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
1206                  * @param mid The ID of the member to construct
1207                  * @since 1.0
1208                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
1209                  */
1210                 public Member(Mid mid) {
1211                     super(mid);
1212                 }
1213                 @Override
1214                 /**
1215                  * <p>Evaluates the property, represented by the current member instance, of the
1216                  * argument object.</p>
1217                  * @param o The argument object
1218                  * @return The value of the current member based on the object argument.
1219                  * @since 1.0
1220                  * @javascript Re-compilers must convert the instance invocation of this method into
1221                  * the JavaScript expression: 
1222                  * <pre>o.m</pre>
1223                  * where <tt>m</tt> is the identifier name resolved from the current member
1224                  * instance of the invocation.
1225                  */
1226                 public Prototype with(ObjectLike o) {
1227                     return new Prototype(super.with(o));
1228                 }
1229 
1230                 /**
1231                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
1232                  * name of this field, qualified by the current member instance of the field, and 
1233                  * to access the property of the name on an object.</p>
1234                  * @since 1.0
1235                  * @see JsDocumentType#valueOf()
1236                  * @javascript Re-compilers must resolve the member of this instance field to the
1237                  * identifier of the field name appending to the identifier resolved from its 
1238                  * qualifying member with a dot in between.
1239                  */
1240                 public final JsFunction.Member<JsRangeException> valueOf = new JsFunction.Member<JsRangeException>(this, Members.valueOf);
1241             }
1242 
1243             /**
1244              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
1245              * with the wrapping constructor.</p>
1246              * @param var The argument of an <b>opaque</b> object.
1247              * @since 1.0
1248              * @javascript Re-compilers must ignore the construction operation of this constructor,
1249              * that is, replacing it with its only argument.
1250              */
1251             public Prototype(JsObject var) {
1252                 super(var(var, (JsFunction<?>)null));
1253             }
1254 
1255             /**
1256              * <p>An <b>opaque</b> static field defining a member that is named by the field name
1257              * without a qualifying member and to access the property of the name on an object.</p>
1258              * @since 1.0
1259              * @see JsDocumentType#valueOf()
1260              * @javascript Re-compilers must resolve the member of this static field to the
1261              * identifier of the field name.
1262              */
1263             public static final JsFunction.Member<JsRangeException> valueOf = new JsFunction.Member<JsRangeException>(Members.valueOf);
1264         }
1265     }
1266 }