All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.avaje.ebeanservice.docstore.api.mapping.DocPropertyAdapter Maven / Gradle / Ivy

There is a newer version: 9.5.1
Show newest version
package com.avaje.ebeanservice.docstore.api.mapping;

import com.avaje.ebeaninternal.server.text.json.PathStack;

/**
 * Adapter for DocPropertyVisitor that does not do anything.
 * Used to extend and implement only the desired methods.
 */
public abstract class DocPropertyAdapter implements DocPropertyVisitor {

  protected PathStack pathStack = new PathStack();

  @Override
  public void visitProperty(DocPropertyMapping property) {
    // do nothing
  }

  @Override
  public void visitBegin() {
    // do nothing
  }

  @Override
  public void visitEnd() {
    // do nothing
  }

  @Override
  public void visitBeginObject(DocPropertyMapping property) {
    pathStack.push(property.getName());
  }

  @Override
  public void visitEndObject(DocPropertyMapping property) {
    pathStack.pop();
  }

  @Override
  public void visitBeginList(DocPropertyMapping property) {
    pathStack.push(property.getName());
  }

  @Override
  public void visitEndList(DocPropertyMapping property) {
    pathStack.pop();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy