Package org.codehaus.groovy.util

Examples of org.codehaus.groovy.util.ReferenceBundle


    @Override
    public Object eval(final String script, final ScriptContext context) throws ScriptException {
        try {
            final String val = (String) context.getAttribute(KEY_REFERENCE_TYPE, ScriptContext.ENGINE_SCOPE);
            ReferenceBundle bundle = ReferenceBundle.getHardBundle();
            if (val != null && val.length() > 0) {
                if (val.equalsIgnoreCase(REFERENCE_TYPE_SOFT)) {
                    bundle = ReferenceBundle.getSoftBundle();
                } else if (val.equalsIgnoreCase(REFERENCE_TYPE_WEAK)) {
                    bundle = ReferenceBundle.getWeakBundle();
View Full Code Here


    public Object eval(String script, ScriptContext ctx)
            throws ScriptException {
        try {
            String val = (String) ctx.getAttribute("#jsr223.groovy.engine.keep.globals", ScriptContext.ENGINE_SCOPE);
            ReferenceBundle bundle = ReferenceBundle.getHardBundle();
            if (val!=null && val.length()>0) {
                if (val.equalsIgnoreCase("soft")) {
                    bundle = ReferenceBundle.getSoftBundle();
                } else if (val.equalsIgnoreCase("weak")) {
                    bundle = ReferenceBundle.getWeakBundle();
View Full Code Here

      super(weakBundle);
    }

    @Override
    protected GroovyClassValuePreJava7Segment createSegment(Object segmentInfo, int cap) {
      ReferenceBundle bundle = (ReferenceBundle) segmentInfo;
      if (bundle==null) throw new IllegalArgumentException("bundle must not be null ");
      return new GroovyClassValuePreJava7Segment(bundle, cap);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.util.ReferenceBundle

Copyright © 2018 www.massapicom. 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.