Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed to the Apache Software Foundation (ASF) under one or more
   * contributor license agreements.  See the NOTICE file distributed with
   * this work for additional information regarding copyright ownership.
   * The ASF licenses this file to You under the Apache License, Version 2.0
   * (the "License"); you may not use this file except in compliance with
   * the License.  You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.apache.jasper.el;
 
 import static org.jboss.web.JasperMessages.MESSAGES;
 
 
 
 
 
 public final class ELResolverImpl extends ELResolver {
 
     public static final boolean NEW_RESOLVER_INSTANCE = 
         Boolean.valueOf(System.getProperty("org.apache.jasper.el.ELResolverImpl.NEW_RESOLVER_INSTANCE""false")).booleanValue();
 
     private final static ELResolver DefaultResolver = new CompositeELResolver();
 
     static {
         ((CompositeELResolver).add(new MapELResolver());
     }
 
     private final VariableResolver variableResolver;
 
     public ELResolverImpl(VariableResolver variableResolver) {
         this. = variableResolver;
     }
 
     public Object getValue(ELContext contextObject baseObject property)
             throws NullPointerExceptionPropertyNotFoundExceptionELException {
         if (context == null) {
             throw .elResolverNullContext();
         }
 
         if (base == null) {
             context.setPropertyResolved(true);
             if (property != null) {
                 try {
                     return this..resolveVariable(property
                             .toString());
                 } catch (javax.servlet.jsp.el.ELException e) {
                     throw new ELException(.errorResolvingVariable
                             (property.toString(), e.getMessage()), e.getCause());
                 }
             }
         }
 
         if (!context.isPropertyResolved()) {
             return getDefaultResolver().getValue(contextbaseproperty);
         }
         return null;
     }
 
     public Class<?> getType(ELContext contextObject baseObject property)
             throws NullPointerExceptionPropertyNotFoundExceptionELException {
         if (context == null) {
             throw .elResolverNullContext();
         }
 
         if (base == null) {
             context.setPropertyResolved(true);
             if (property != null) {
                 try {
                     Object obj = this..resolveVariable(property
                             .toString());
                     return (obj != null) ? obj.getClass() : null;
                 } catch (javax.servlet.jsp.el.ELException e) {
                    throw new ELException(.errorResolvingVariable
                            (property.toString(), e.getMessage()), e.getCause());
                }
            }
        }
        if (!context.isPropertyResolved()) {
            return getDefaultResolver().getType(contextbaseproperty);
        }
        return null;
    }
    public void setValue(ELContext contextObject baseObject property,
            Object valuethrows NullPointerException,
            ELException {
        if (context == null) {
            throw .elResolverNullContext();
        }
        if (base == null) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException(.legacyVariableResolver());
        }
        if (!context.isPropertyResolved()) {
            getDefaultResolver().setValue(contextbasepropertyvalue);
        }
    }
    public boolean isReadOnly(ELContext contextObject baseObject property)
            throws NullPointerExceptionPropertyNotFoundExceptionELException {
        if (context == null) {
            throw .elResolverNullContext();
        }
        if (base == null) {
            context.setPropertyResolved(true);
            return true;
        }
        return getDefaultResolver().isReadOnly(contextbaseproperty);
    }
        return getDefaultResolver().getFeatureDescriptors(contextbase);
    }
    public Class<?> getCommonPropertyType(ELContext contextObject base) {
        if (base == null) {
            return String.class;
        }
        return getDefaultResolver().getCommonPropertyType(contextbase);
    }
    public static ELResolver getDefaultResolver() {
            CompositeELResolver defaultResolver = new CompositeELResolver();
            defaultResolver.add(new MapELResolver());
            defaultResolver.add(new ResourceBundleELResolver());
            defaultResolver.add(new ListELResolver());
            defaultResolver.add(new ArrayELResolver());
            defaultResolver.add(new BeanELResolver());
            return defaultResolver;
        } else {
            return ;
        }
    }
New to GrepCode? Check out our FAQ X