Exemplo n.º 1
0
  /** 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();
  }
Exemplo n.º 2
0
 /** 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);
 }