/* (non-Javadoc)
@see com.abubusoft.kripton.xml.XmlPullParser#require(int, java.lang.String, java.lang.String)
777714
@Override
	public void require(int type, String namespace, String name) throws KriptonRuntimeException, IOException {
		if (type != this.type || (namespace != null && !namespace.equals(getNamespace())) || (name != null && !name.equals(getName()))) {
			throw new KriptonRuntimeException("expected: " + TYPES[type] + " {" + namespace + "}" + name, true, this.getLineNumber(), this.getColumnNumber(), getPositionDescription(), null);
		}
	}
721771
public static String requiredString(JSONObject o, String id) throws JSONConverterException {
        checkKeys(o, id);
        Object x = o.get(id);
        return x.toString();
    }
306932
public void required(final String tagName, final String actionName, final String attributeName, final Object attribute) throws PageException {
	if (attribute == null) {
	    final Excepton util = CFMLEngineFactory.getInstance().getExceptionUtil();
	    throw util.createApplicationException("Attribute [" + attributeName + "] for tag [" + tagName + "] is required if attribute action has the value [" + actionName + "]");
	}
    }
58554
public T add(String str) {
    requireNonNull(str, JVM_OPTION_NOT_NULL_ERROR_MESSAGE);
    String value = str.trim();
    if (isInvalidOption(value)) {
      throw new IllegalArgumentException("a JVM option can't be empty and must start with '-'");
    }
    checkMandatoryOptionOverwrite(value);
    options.add(value);

    return castThis();
  }
1235496
public final srecParser.require_return require() throws RecognitionException {
        srecParser.require_return retval = new srecParser.require_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token string_literal3=null;
        Token STRING4=null;
        Token NEWLINE5=null;

        CommonTree string_literal3_tree=null;
        CommonTree STRING4_tree=null;
        CommonTree NEWLINE5_tree=null;
        RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
        RewriteRuleTokenStream stream_STRING=new RewriteRuleTokenStream(adaptor,"token STRING");
        RewriteRuleTokenStream stream_28=new RewriteRuleTokenStream(adaptor,"token 28");

        try {
            // /home/victor/srec/core/src/main/antlr/srec.g:46:2: ( 'require' STRING NEWLINE -> ^( REQUIRE STRING ) )
            // /home/victor/srec/core/src/main/antlr/srec.g:46:4: 'require' STRING NEWLINE
            {
            string_literal3=(Token)match(input,28,FOLLOW_28_in_require151); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_28.add(string_literal3);

            STRING4=(Token)match(input,STRING,FOLLOW_STRING_in_require153); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_STRING.add(STRING4);

            NEWLINE5=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_require155); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE5);



            // AST REWRITE
            // elements: STRING
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 47:3: -> ^( REQUIRE STRING )
            {
                // /home/victor/srec/core/src/main/antlr/srec.g:47:6: ^( REQUIRE STRING )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REQUIRE, "REQUIRE"), root_1);

                adaptor.addChild(root_1, stream_STRING.nextNode());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
1369084
protected void requireNoElements( final XMLExtendedStreamReader reader ) throws XMLStreamException {
        if (reader.nextTag() != END_ELEMENT) {
            throw ParseUtils.unexpectedElement(reader);
        }
    }
918186
function requirePaddingFor(node) {
      switch (node.type) {
        case 'BlockStatement':
          return options.blocks;

        case 'SwitchStatement':
          return options.switches;

        case 'ClassBody':
          return options.classes;

        /* istanbul ignore next */
        default:
          throw new Error('unreachable');
      }
    }
567913
public static void requireArgMin(@NotNull final String name, @NotNull final long value, final long min)
            throws ConstraintViolationException {
        // CHECKSTYLE:ON
        if (value < min) {
            throw new ConstraintViolationException("Min value of argument '" + name + "' is " + min + ", but was: " + value);
        }
    }
1121389
public static void requireArgValid(@NotNull final String name, @NotNull final String value) throws ConstraintViolationException {
        // CHECKSTYLE:ON
        final String trimmedValue = value.trim();
        if (!isValid(trimmedValue)) {
            throw new ConstraintViolationException("The argument '" + name + "' is not valid: '" + trimmedValue + "'");
        }
    }
737673
function require( requireId, callback ) {
        // #begin-ignore
        // #begin assertNotContainRelativeId
        // 确定require的模块id不包含相对id。用于global require，提前预防难以跟踪的错误出现
        var invalidIds = [];

        /**
         * 监测模块id是否relative id
         *
         * @inner
         * @param {string} id 模块id
         */
        function monitor( id ) {
            if ( id.indexOf( '.' ) === 0 ) {
                invalidIds.push( id );
            }
        }

        if ( typeof requireId === 'string' ) {
            monitor( requireId );
        }
        else {
            each(
                requireId,
                function ( id ) {
                    monitor( id );
                }
            );
        }

        // 包含相对id时，直接抛出错误
        if ( invalidIds.length > 0 ) {
            throw new Error(
                '[REQUIRE_FATAL]Relative ID is not allowed in global require: '
                + invalidIds.join( ', ' )
            );
        }
        // #end assertNotContainRelativeId

        // 超时提醒
        var timeout = requireConf.waitSeconds;
        if ( timeout && (requireId instanceof Array) ) {
            if ( waitTimeout ) {
                clearTimeout( waitTimeout );
            }
            waitTimeout = setTimeout( waitTimeoutNotice, timeout * 1000 );
        }
        // #end-ignore

        return actualGlobalRequire( requireId, callback );
    }
68976
private void require(int len)
  {
    int offset = _offset;
    int length = _length;
    
    if (offset + len < length) {
      return;
    }
    
    flush(_offset);
  }
1342465
protected AstNode cmp(boolean required) throws ScanException, ParseException {
		AstNode v = add(required);
		if (v == null) {
			return null;
		}
		while (true) {
			switch (token.getSymbol()) {
				case LT:
					consumeToken();
					v = createAstBinary(v, add(true), AstBinary.LT);
					break;
				case LE:
					consumeToken();
					v = createAstBinary(v, add(true), AstBinary.LE);
					break;
				case GE:
					consumeToken();
					v = createAstBinary(v, add(true), AstBinary.GE);
					break;
				case GT:
					consumeToken();
					v = createAstBinary(v, add(true), AstBinary.GT);
					break;
				case EXTENSION:
					if (getExtensionHandler(token).getExtensionPoint() == ExtensionPoint.CMP) {
						v = getExtensionHandler(consumeToken()).createAstNode(v, add(true));
						break;
					}
				default:
					return v;
			}
		}
	}
950068
public void validateXMLString(String xml, String dtdFile, String docType) throws SAXException, IOException, ParserConfigurationException {
    validateInternal(xml, dtdFile, docType);
  }
1353772
function require( requireId, callback ) {
        // #begin-ignore
        assertNotContainRelativeId( requireId );

        // 超时提醒
        var timeout = requireConf.waitSeconds;
        if ( isArray( requireId ) && timeout ) {
            if ( waitTimeout ) {
                clearTimeout( waitTimeout );
            }
            waitTimeout = setTimeout( waitTimeoutNotice, timeout * 1000 );
        }
        // #end-ignore

        return actualGlobalRequire( requireId, callback );
    }
639632
protected XmlPullParser loadXml(String source) throws UnsupportedEncodingException, XmlPullParserException, IOException {
		return loadXml(new ByteArrayInputStream(source.getBytes("UTF-8")));
	}
1152243
public static void requireNoContent(final XMLStreamReader reader) throws XMLStreamException {
        if (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            throw unexpectedElement(reader);
        }
    }
1287760
public boolean addDynamicRequire(String require) {
    if (!dynamicRequires.contains(require)) {
      dynamicRequires.add(require);
      return true;
    }
    return false;
  }