/** Configure a BaseFunction from a @SkylarkSignature annotation */ public void configure(SkylarkSignature annotation) { Preconditions.checkState(!isConfigured()); // must not be configured yet this.paramDoc = new ArrayList<>(); this.signature = SkylarkSignatureProcessor.getSignature( getName(), annotation, unconfiguredDefaultValues, paramDoc, getEnforcedArgumentTypes()); this.objectType = annotation.objectType().equals(Object.class) ? null : annotation.objectType(); configure(); }
/** Configure the reflection mechanism */ @Override public void configure(SkylarkSignature annotation) { Preconditions.checkState(!isConfigured()); // must not be configured yet enforcedArgumentTypes = new ArrayList<>(); this.extraArgs = SkylarkSignatureProcessor.getExtraArgs(annotation); this.returnType = annotation.returnType(); super.configure(annotation); }