Examples of initFromContext()


Examples of com.google.javascript.jscomp.mozilla.rhino.CompilerEnvirons.initFromContext()

                           Logger logger) throws IOException {
    Context cx = Context.enter();
    cx.setErrorReporter(errorReporter);
    cx.setLanguageVersion(Context.VERSION_1_5);
    CompilerEnvirons compilerEnv = new CompilerEnvirons();
    compilerEnv.initFromContext(cx);
    compilerEnv.setRecordingComments(true);
    compilerEnv.setRecordingLocalJsDocComments(true);
    // ES5 specifically allows trailing commas
    compilerEnv.setWarnTrailingComma(
        config.languageMode == LanguageMode.ECMASCRIPT3);
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.CompilerEnvirons.initFromContext()

    public String preProcess(final HtmlPage htmlPage, String sourceCode, final String sourceName,
                final HtmlElement htmlElement) {

        try {
            final CompilerEnvirons environs = new CompilerEnvirons();
            environs.initFromContext(contextFactory_.enterContext());
            final AstNode root = new Parser(environs).parse(sourceCode, sourceName, lineNo_);
            final Map<Integer, Integer> strings = new TreeMap<Integer, Integer>();
            root.visit(new NodeVisitor() {

                public boolean visit(final AstNode node) {
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.GeneratedByteCode.initFromContext()

      if (t != null)
        throw StandardException.newException(SQLState.GENERATED_CLASS_INSTANCE_ERROR, t, getName());
    }

    GeneratedByteCode ni = factory.getNewInstance();
    ni.initFromContext(context);
    ni.setGC(this);
    ni.postConstructor();
    return ni;

  }
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.GeneratedByteCode.initFromContext()

  public Object newInstance(Context context) throws StandardException  {

    Throwable t;
    try {
      GeneratedByteCode ni =  (GeneratedByteCode) ci.getNewInstance();
      ni.initFromContext(context);
      ni.setGC(this);
      ni.postConstructor();
      return ni;

    } catch (InstantiationException ie) {
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.GeneratedByteCode.initFromContext()

  public Object newInstance(Context context) throws StandardException  {

    Throwable t;
    try {
      GeneratedByteCode ni =  (GeneratedByteCode) ci.getNewInstance();
      ni.initFromContext(context);
      ni.setGC(this);
      ni.postConstructor();
      return ni;

    } catch (InstantiationException ie) {
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.GeneratedByteCode.initFromContext()

      if (t != null)
        throw StandardException.newException(SQLState.GENERATED_CLASS_INSTANCE_ERROR, t, getName());
    }

    GeneratedByteCode ni = factory.getNewInstance();
    ni.initFromContext(context);
    ni.setGC(this);
    ni.postConstructor();
    return ni;

  }
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.GeneratedByteCode.initFromContext()

  public Object newInstance(Context context) throws StandardException  {

    Throwable t;
    try {
      GeneratedByteCode ni =  (GeneratedByteCode) ci.getNewInstance();
      ni.initFromContext(context);
      ni.setGC(this);
      ni.postConstructor();
      return ni;

    } catch (InstantiationException ie) {
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.GeneratedByteCode.initFromContext()

      if (t != null)
        throw StandardException.newException(SQLState.GENERATED_CLASS_INSTANCE_ERROR, t, getName());
    }

    GeneratedByteCode ni = factory.getNewInstance();
    ni.initFromContext(context);
    ni.setGC(this);
    ni.postConstructor();
    return ni;

  }
View Full Code Here

Examples of org.mozilla.javascript.CompilerEnvirons.initFromContext()


        private Class<?> compileClass( final Context pContext, final String pSourceName, final String pClassName, final Class<?> pSuperClass, final Class<?>[] pInterfaces) {

            final CompilerEnvirons environments = new CompilerEnvirons();
            environments.initFromContext(pContext);
            final ClassCompiler compiler = new ClassCompiler(environments);

            if (pSuperClass != null) {
                compiler.setTargetExtends(pSuperClass);
            }
View Full Code Here

Examples of org.mozilla.javascript.CompilerEnvirons.initFromContext()

    // Parse script source
    CompilerEnvirons ce = new CompilerEnvirons();
    ScriptParserErrorReporter errorReporter = new ScriptParserErrorReporter();
   
    ce.setGenerateDebugInfo(true);   
    ce.initFromContext(ContextFactory.getGlobal().enterContext());
    ce.setErrorReporter(errorReporter);
   
    Parser p = new Parser(ce, errorReporter);
    ScriptOrFnNode ast = p.parse(this.scriptSource, "script", 0);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.