io.ebeanservice.docstore.api.mapping.DocPropertyAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeanservice.docstore.api.mapping;
import io.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