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

templates.includes.webclient.ksoap.FaceDbSDK.body.vm Maven / Gradle / Ivy

There is a newer version: 3.5.0
Show newest version
    ${className}($stubClassName stub, FaceAPI faInstance) {
         super(faInstance);
         if(null==stub)
             throw new IllegalArgumentException("stub must not be null");
         this.stub = stub;
    }
    public static class Builder {
        private $stubClassName  stub = null;
        private FaceAPI faceAPI = null;
        private ${stubClassName}.Builder builder=null;
        public #typeName($sourceinfo.interfaceClass) build() {
            if(stub==null){
                if(builder==null)
                    throw new IllegalArgumentException("stub or builder must no be null");
                stub=builder.build();
            }                
            if (null == faceAPI) 
                faceAPI = FaceAPIWebserviceByKSoap.builder().setStub(stub).build();
            return new ${className}(stub, faceAPI);
        }

        public ${stubClassName}.Builder stubBuilder() {
            builder = ${stubClassName}.builder(this);
            return builder;
        }

        /**
         * @param faceAPI
         *            要设置的 faceAPI
         * @return Builder
         */
        public Builder setFaceAPI(FaceAPI faceAPI) {
            this.faceAPI = faceAPI;
            return this;
        }
        /**
         * @param stub 要设置的 stub
         * @return Builder
         */
        public Builder setStub($stubClassName stub) {
            this.stub = stub;
            return this;
        }
    }

    public static Builder builder() {
        return new Builder();
    }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy