Examples of PropertyAccess


Examples of com.google.dart.engine.ast.PropertyAccess

    Element element = null;
    if (expression instanceof Identifier) {
      Identifier identifier = (Identifier) expression;
      element = identifier.getStaticElement();
    } else if (expression instanceof PropertyAccess) {
      PropertyAccess propertyAccess = (PropertyAccess) expression;
      element = propertyAccess.getPropertyName().getStaticElement();
    }
    if (element instanceof PropertyAccessorElement) {
      PropertyAccessorElement pae = (PropertyAccessorElement) element;
      PropertyInducingElement variable = pae.getVariable();
      return variable != null && variable.isConst();
View Full Code Here

Examples of com.google.dart.engine.ast.PropertyAccess

    {
      AstNode node = identifier;
      parent = node.getParent();
      // new T().field = x;
      if (parent instanceof PropertyAccess) {
        PropertyAccess propertyAccess = (PropertyAccess) parent;
        if (propertyAccess.getPropertyName() == node) {
          node = propertyAccess;
          parent = propertyAccess.getParent();
        }
      }
      // obj.field = x;
      if (parent instanceof PrefixedIdentifier) {
        PrefixedIdentifier prefixedIdentifier = (PrefixedIdentifier) parent;
View Full Code Here

Examples of com.google.dart.engine.ast.PropertyAccess

      element = ((Identifier) expression).getStaticElement();
      if (expression instanceof PrefixedIdentifier) {
        highlightedNode = ((PrefixedIdentifier) expression).getIdentifier();
      }
    } else if (expression instanceof PropertyAccess) {
      PropertyAccess propertyAccess = (PropertyAccess) expression;
      element = propertyAccess.getPropertyName().getStaticElement();
      highlightedNode = propertyAccess.getPropertyName();
    }
    // check if element is assignable
    if (element instanceof PropertyAccessorElement) {
      PropertyAccessorElement accessor = (PropertyAccessorElement) element;
      element = accessor.getVariable();
View Full Code Here

Examples of com.google.dart.engine.ast.PropertyAccess

        return false;
      }
    }
    // qualified property access
    if (parent instanceof PropertyAccess) {
      PropertyAccess access = (PropertyAccess) parent;
      if (access.getPropertyName() == node && access.getRealTarget() != null) {
        return false;
      }
    }
    if (parent instanceof PrefixedIdentifier) {
      PrefixedIdentifier prefixed = (PrefixedIdentifier) parent;
View Full Code Here

Examples of org.apache.bval.util.PropertyAccess

     * @throws IllegalStateException    - when no property is currently set in the context (application logic bug)
     */
    public Object getPropertyValue() {
        if (access == null) { // undefined access strategy
            return getPropertyValue(
                  new PropertyAccess(bean.getClass(), metaProperty.getName()));
        } else {
            return getPropertyValue(access);
        }
    }
View Full Code Here

Examples of org.apache.bval.util.PropertyAccess

        if (access == null && prop.getMetaBean() != null) { // single property access strategy
            // save old values from context
            final Object bean = context.getBean();
            final MetaBean mbean = context.getMetaBean();
            // modify context state for relationship-target bean
            context.moveDown(prop, new PropertyAccess(bean.getClass(), prop.getName()));
            validateContext(context);
            // restore old values in context
            context.moveUp(bean, mbean);
        } else if (access != null) { // different accesses to relation
            // save old values from context
View Full Code Here

Examples of org.apache.bval.util.PropertyAccess

     * @throws IllegalStateException    - when no property is currently set in the context (application logic bug)
     */
    public Object getPropertyValue() {
        if (access == null) { // undefined access strategy
            return getPropertyValue(
                  new PropertyAccess(bean.getClass(), metaProperty.getName()));
        } else {
            return getPropertyValue(access);
        }
    }
View Full Code Here

Examples of org.apache.bval.util.PropertyAccess

                                                            // access strategy
            // save old values from context
            final Object bean = context.getBean();
            final MetaBean mbean = context.getMetaBean();
            // modify context state for relationship-target bean
            context.moveDown(prop, new PropertyAccess(bean.getClass(), prop.getName()));
            ValidationHelper.validateContext(context, new BeanValidatorCallback(context), treatMapsLikeBeans);
            // restore old values in context
            context.moveUp(bean, mbean);
        } else if (access != null) { // different accesses to relation
            // save old values from context
View Full Code Here

Examples of org.apache.bval.util.PropertyAccess

     * @throws IllegalStateException    - when no property is currently set in the context (application logic bug)
     */
    public Object getPropertyValue() {
        if (access == null) { // undefined access strategy
            return getPropertyValue(
                  new PropertyAccess(bean.getClass(), metaProperty.getName()));
        } else {
            return getPropertyValue(access);
        }
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        Class transformed = _classPool.toClass(targetObjectCtClass, _loader);

        Object target = ct.createInstantiator(transformed).newInstance(resources);

        PropertyAccess access = new PropertyAccessImpl();

        try
        {
            access.set(target, "value", "anything");
            unreachable();
        }
        catch (RuntimeException ex)
        {
            // The PropertyAccess layer adds a wrapper exception around the real one.
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.