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

net.gdface.sdk.decorator.EyeInfo Maven / Gradle / Ivy

The newest version!
// ______________________________________________________
// Generated by codegen - https://gitee.com/l0km/codegen 
// template: thrift/service/perstruct/bean.decorator.class.vm
// ______________________________________________________

package net.gdface.sdk.decorator;
import net.gdface.thrift.ThriftDecorator;
import com.facebook.swift.codec.ThriftStruct;
import com.facebook.swift.codec.ThriftField;
import com.facebook.swift.codec.ThriftField.Requiredness;
/**
 * decorator pattern 装饰者模式代理{@link net.gdface.sdk.EyeInfo}
* 代理对象必须有默认构造方法,必须是普通类型,不可以有@ThriftStruct注释
* 转发所有{@link net.gdface.sdk.EyeInfo}get/set方法到{@link #delegate()}指定的实例,
* 计算机生成代码(generated by automated tools ThriftServiceDecoratorGenerator @author guyadong)
* @author guyadong * */ @ThriftStruct public final class EyeInfo implements ThriftDecorator { private final net.gdface.sdk.EyeInfo delegate; public EyeInfo(){ this(new net.gdface.sdk.EyeInfo()); } public EyeInfo(net.gdface.sdk.EyeInfo delegate) { if(null == delegate){ throw new NullPointerException("delegate is null"); } // 检查被装饰类是否有@ThriftStruct注释 if(delegate.getClass().isAnnotationPresent(ThriftStruct.class)){ throw new IllegalArgumentException( String.format("NOT ALLOW %s have @ThriftStruct annotation",delegate.getClass().getName())); } this.delegate = delegate; } /** * 返回被装饰的{@link net.gdface.sdk.EyeInfo}实例 * @return */ @Override public net.gdface.sdk.EyeInfo delegate() { return delegate; } @Override public int hashCode() { return delegate().hashCode(); } @Override public boolean equals(Object obj) { return delegate().equals(obj); } @Override public String toString() { return delegate().toString(); } @ThriftField(value = 1,name = "leftx",requiredness=Requiredness.REQUIRED) public int getLeftx(){ return delegate().getLeftx(); } @ThriftField public void setLeftx(int value){ delegate().setLeftx(value); } @ThriftField(value = 2,name = "lefty",requiredness=Requiredness.REQUIRED) public int getLefty(){ return delegate().getLefty(); } @ThriftField public void setLefty(int value){ delegate().setLefty(value); } @ThriftField(value = 3,name = "rightx",requiredness=Requiredness.REQUIRED) public int getRightx(){ return delegate().getRightx(); } @ThriftField public void setRightx(int value){ delegate().setRightx(value); } @ThriftField(value = 4,name = "righty",requiredness=Requiredness.REQUIRED) public int getRighty(){ return delegate().getRighty(); } @ThriftField public void setRighty(int value){ delegate().setRighty(value); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy