Package com.google.web.bindery.autobean.shared

Examples of com.google.web.bindery.autobean.shared.AutoBeanVisitor


        // RBAC
        //final Set<String> filtered = autoBean.getTag("filtered-attributes")!=null ?
        //    (Set<String>)autoBean.getTag("filtered-attributes") : Collections.EMPTY_SET;

        autoBean.accept(new AutoBeanVisitor() {

            private boolean isComplex = false;

           
            public boolean visitValueProperty(final String propertyName, final Object value, PropertyContext ctx) {
View Full Code Here


   * @param appender the url encoding appender
   */
  public void appendModel(M model, final UrlEncodingAppender appender) {
    AutoBean<M> autoBean = getAutoBean(model);

    autoBean.accept(new AutoBeanVisitor() {
      @Override
      public boolean visitCollectionProperty(String propertyName, AutoBean<Collection<?>> value,
          CollectionPropertyContext ctx) {
        if (value != null) {
          for (Object obj : value.as()) {
View Full Code Here

      return ab;
    }
    ab = factory.create(clazz, model);
    // suppressing warnings for unchecked and raw types as the value must always
    // be of type ctx.getType
    ab.accept(new AutoBeanVisitor() {
      @SuppressWarnings({"unchecked", "rawtypes"})
      @Override
      public boolean visitReferenceProperty(String propertyName, AutoBean<?> value, PropertyContext ctx) {
        ctx.set(getAutoBean(value.as(), (Class) ctx.getType()));
        return true;
View Full Code Here

   * @param appender the url encoding appender
   */
  public void appendModel(M model, final UrlEncodingAppender appender) {
    AutoBean<M> autoBean = getAutoBean(model);

    autoBean.accept(new AutoBeanVisitor() {
      @Override
      public boolean visitCollectionProperty(String propertyName, AutoBean<Collection<?>> value,
          CollectionPropertyContext ctx) {
        if (value != null) {
          for (Object obj : value.as()) {
View Full Code Here

        // RBAC
        //final Set<String> filtered = autoBean.getTag("filtered-attributes")!=null ?
        //    (Set<String>)autoBean.getTag("filtered-attributes") : Collections.EMPTY_SET;

        autoBean.accept(new AutoBeanVisitor() {

            private boolean isComplex = false;

           
            public boolean visitValueProperty(final String propertyName, final Object value, PropertyContext ctx) {
View Full Code Here

      return ab;
    }
    ab = factory.create(clazz, model);
    // suppressing warnings for unchecked and raw types as the value must always
    // be of type ctx.getType
    ab.accept(new AutoBeanVisitor() {
      @SuppressWarnings({"unchecked", "rawtypes"})
      @Override
      public boolean visitReferenceProperty(String propertyName, AutoBean<?> value, PropertyContext ctx) {
        ctx.set(getAutoBean(value.as(), (Class) ctx.getType()));
        return true;
View Full Code Here

        this.editedEntity = bean;

        final Map<String, String> exprMap = getExpressions(editedEntity);

        autoBean.accept(new AutoBeanVisitor() {

            private boolean isComplex = false;

           
            public boolean visitValueProperty(final String propertyName, final Object value, PropertyContext ctx) {
View Full Code Here

        // RBAC
        //final Set<String> filtered = autoBean.getTag("filtered-attributes")!=null ?
        //    (Set<String>)autoBean.getTag("filtered-attributes") : Collections.EMPTY_SET;

        autoBean.accept(new AutoBeanVisitor() {

            private boolean isComplex = false;

           
            public boolean visitValueProperty(final String propertyName, final Object value, PropertyContext ctx) {
View Full Code Here

    assertNotNull(AutoBeanUtils.getAutoBean(retrieved));
  }

  public void testParameterizationVisitor() {
    AutoBean<HasComplexTypes> auto = factory.hasListOfList();
    auto.accept(new AutoBeanVisitor() {
      int count = 0;

      @Override
      public void endVisit(AutoBean<?> bean, Context ctx) {
        assertEquals(3, count);
View Full Code Here

     */
    AutoBean<?> previous = serialized.get(id);
    if (previous == null || !previous.isFrozen()) {
      serialized.put(id, root);
      serializeOneProxy(id, root);
      root.accept(new AutoBeanVisitor() {
        @Override
        public void endVisit(AutoBean<?> bean, Context ctx) {
          // Avoid unnecessary method call
          if (bean == root) {
            return;
View Full Code Here

TOP

Related Classes of com.google.web.bindery.autobean.shared.AutoBeanVisitor

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.