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
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
 package javax.faces.el;

Provides methods to read, write and inspect properties of javabeans, Maps, Arrays and Lists. This class is used by such things as the ValueBinding implementation and the ManagedBeanBuilder to access JSF beans. See the javadoc of the JSF Specification for more details.

Thomas Spiegl (latest modification by $Author: grantsmith $)
$Revision: 472555 $ $Date: 2006-11-08 18:30:58 +0100 (Mi, 08 Nov 2006) $
 public abstract class PropertyResolver
     public PropertyResolver()
Returns the datatype of the specified element within a list or array.

Param base must be of type Array or List.

     public abstract Class getType(Object baseint index)
         throws EvaluationExceptionPropertyNotFoundException;

Returns the datatype of the specified javabean property on the specified object.

Param base may be a map, in which case param property is used as a key into the map, and the type of the object with that key is returned. If there is no such key in the map, then Object.class is returned.

Otherwise java.beans.Introspector is used to determine the actual property type. If the base bean has no such property then a PropertyNotFoundException is thrown.

base must not be null.
property must be of type String, must not be null and must not be an empty string.
     public abstract Class getType(Object basejava.lang.Object property)
         throws EvaluationExceptionPropertyNotFoundException;

Return the specified element from a list or array.

Param base must be of type Array or List. When the array is of a primitive type, the appropriate wrapper is returned.

Null is returned when param index is "out of bounds" for the provided base object.

ReferenceSyntaxException if the base object is not an Array or List.
     public abstract Object getValue(Object baseint index)
         throws EvaluationExceptionPropertyNotFoundException;

Return the current value of the specified property on the base object.

If base is a Map, then Map.get(property) is returned. Null is returned if there is no entry with that key.

Otherwise, java.beans.Introspector is applied to the base object to find the associated PropertyDescriptor and the specified read method is invoked.

PropertyNotFoundException if the provided object does not have the specified property.
     public abstract Object getValue(Object basejava.lang.Object property)
     public abstract boolean isReadOnly(Object baseint index)
    public abstract boolean isReadOnly(Object basejava.lang.Object property)
        throws EvaluationExceptionPropertyNotFoundException;

Replace the object at the specified index within the base collection with the provided value.

Param base is expected to be an Array or List object.

EvaluationException if the base object is not an Array or List.
PropertyNotFoundException if the index is "out of bounds".
    public abstract void setValue(Object baseint indexjava.lang.Object value)
        throws EvaluationExceptionPropertyNotFoundException;

Set the named property on the base object to the provided value.
    public abstract void setValue(Object baseObject propertyjava.lang.Object value)
New to GrepCode? Check out our FAQ X