
net.gdface.sdk.decorator.NotFaceDetectedException Maven / Gradle / Ivy
// ______________________________________________________
// Generated by codegen - https://gitee.com/l0km/codegen
// template: thrift/service/perstruct/exception.decorator.class.vm
// ______________________________________________________
package net.gdface.sdk.decorator;
import net.gdface.thrift.ThriftDecorator;
import net.gdface.thrift.exception.BaseServiceException;
import java.io.PrintStream;
import java.io.PrintWriter;
import com.facebook.swift.codec.ThriftStruct;
import com.facebook.swift.codec.ThriftField;
import com.facebook.swift.codec.ThriftField.Requiredness;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* 没有提取到人脸特征码,或检测到的人脸数目不合要求
* @author guyadong
* ========================================
* decorator pattern 装饰者模式代理{@link net.gdface.sdk.NotFaceDetectedException}
* 代理对象必须有默认构造方法,String参数构造方法可选,必须是普通类型,不可以有@ThriftStruct注释
* 转发所有{@link net.gdface.sdk.NotFaceDetectedException}get/set方法到{@link #delegate()}指定的实例,
* 计算机生成代码(generated by automated tools ThriftServiceDecoratorGenerator @author guyadong)
*
*/
@ThriftStruct
public final class NotFaceDetectedException extends BaseServiceException
implements ThriftDecorator {
private static final long serialVersionUID = 1L;
private final net.gdface.sdk.NotFaceDetectedException delegate;
public NotFaceDetectedException(){
this(new net.gdface.sdk.NotFaceDetectedException());
}
public NotFaceDetectedException(String message){
this(new net.gdface.sdk.NotFaceDetectedException(message));
}
public NotFaceDetectedException(net.gdface.sdk.NotFaceDetectedException delegate) {
super(checkNotNull(delegate,"delegate is null").getMessage(),delegate.getCause());
// 检查被装饰类是否有@ThriftStruct注释
if(delegate.getClass().isAnnotationPresent(ThriftStruct.class)){
throw new IllegalArgumentException(
String.format("NOT ALLOW %s have @ThriftStruct annotation",delegate.getClass().getName()));
}
this.delegate = delegate;
}
/**
* @return 返回被装饰的{@link net.gdface.sdk.NotFaceDetectedException}实例
*/
@Override
public net.gdface.sdk.NotFaceDetectedException delegate() {
return delegate;
}
@Override
public void printStackTrace() {
delegate().printStackTrace();
}
@Override
public void printStackTrace(PrintStream s) {
delegate().printStackTrace(s);
}
@Override
public void printStackTrace(PrintWriter s) {
delegate().printStackTrace(s);
}
@Override
public StackTraceElement[] getStackTrace() {
return delegate().getStackTrace();
}
@Override
public Throwable initCause(Throwable cause) {
return delegate().initCause(cause);
}
@Override
public int hashCode() {
return delegate().hashCode();
}
@Override
public boolean equals(Object obj) {
return delegate().equals(obj);
}
@Override
public String toString() {
return delegate().toString();
}
/**
* @return codeNum
*/
@ThriftField(value = 5,name = "codeNum",requiredness=Requiredness.REQUIRED)
public int getCodeNum(){
return delegate().getCodeNum();
}
/**
* @param codeNum 要设置的 codeNum
*/
@ThriftField
public void setCodeNum(int codeNum){
delegate().setCodeNum(codeNum);
}
/**
* @return faceNum
*/
@ThriftField(value = 6,name = "faceNum",requiredness=Requiredness.REQUIRED)
public int getFaceNum(){
return delegate().getFaceNum();
}
/**
* @param faceNum 要设置的 faceNum
*/
@ThriftField
public void setFaceNum(int faceNum){
delegate().setFaceNum(faceNum);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy