Build Java code to represent a cast to the given type.

This will be an argument of the form "(pkg.Cls1)" or "(pkg.Cls2[])" or "(primtype)"

@param builder the builder in which to build the argument
@param cls the type for the argument
10331
protected static void buildClassCast(StringBuilder builder, Class cls) {
        builder.append('(');
        buildClass(builder, cls);
        builder.append(')');
    }
1240830
@Nonnull
	public static <T, R> LObjDblFunction<T, R> objDblFunctionFrom(Consumer<LObjDblFunctionBuilder<T, R>> buildingFunction) {
		LObjDblFunctionBuilder builder = new LObjDblFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
310027
@Nonnull
	public static <T, R> LObjIntDblFunction<T, R> objIntDblFunctionFrom(Consumer<LObjIntDblFunctionBuilder<T, R>> buildingFunction) {
		LObjIntDblFunctionBuilder builder = new LObjIntDblFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
862757
@Nonnull
	public static <T1, T2, R> LObjIntObjFunction<T1, T2, R> objIntObjFunctionFrom(Consumer<LObjIntObjFunctionBuilder<T1, T2, R>> buildingFunction) {
		LObjIntObjFunctionBuilder builder = new LObjIntObjFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
449021
@Nonnull
	public static <R> LSrtFunction<R> srtFunctionFrom(Consumer<LSrtFunctionBuilder<R>> buildingFunction) {
		LSrtFunctionBuilder builder = new LSrtFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
720064
@Nonnull
	public static LIntToFltFunction intToFltFunctionFrom(Consumer<LIntToFltFunctionBuilder> buildingFunction) {
		LIntToFltFunctionBuilder builder = new LIntToFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
551180
@Nonnull
	public static LIntBinaryOperator intBinaryOperatorFrom(Consumer<LIntBinaryOperatorBuilder> buildingFunction) {
		LIntBinaryOperatorBuilder builder = new LIntBinaryOperatorBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
641665
private Map<PluginClassLoaderDef, ClassLoader> build(Collection<PluginClassLoaderDef> defs, ClassloaderBuilder builder) {
    Map<PluginClassLoaderDef, ClassLoader> result = new HashMap<>();
    Map<String, ClassLoader> classloadersByBasePluginKey = builder.build();
    for (PluginClassLoaderDef def : defs) {
      ClassLoader classloader = classloadersByBasePluginKey.get(def.getBasePluginKey());
      if (classloader == null) {
        throw new IllegalStateException(String.format("Fail to create classloader for plugin [%s]", def.getBasePluginKey()));
      }
      result.put(def, classloader);
    }
    return result;
  }
405427
@Nonnull
	public static LDblToSrtFunction dblToSrtFunctionFrom(Consumer<LDblToSrtFunctionBuilder> buildingFunction) {
		LDblToSrtFunctionBuilder builder = new LDblToSrtFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
611606
def build(self, builder):
        
        params = {}

        # Add in the transaction type
        if self.transaction_type is not None:
            params["TransactionType"] = self.transaction_type

        if self.seqnum is None:
            # SeqNum is not optional (and defaulted)
            raise ValueError("SeqNum is not set.")  # pragma: no cover
        params["SeqNum"] = str(self.seqnum)

        if self.annotation_id is not None:
            # If an Annotation is contained with an Annotations element,
            # the ID attribute is required.
            params["ID"] = self.annotation_id

        builder.start("Annotation", params)

        if self.flags in (None, []):
            raise ValueError('Flag is not set.')

        # populate the flags
        for flag in self.flags:
            flag.build(builder)

        # add the Comment, if it exists
        if self.comment is not None:
            self.comment.build(builder)

        builder.end("Annotation")
231578
@Nonnull
	public static <T1, T2> LBiObjFltPredicate<T1, T2> biObjFltPredicateFrom(Consumer<LBiObjFltPredicateBuilder<T1, T2>> buildingFunction) {
		LBiObjFltPredicateBuilder builder = new LBiObjFltPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
561669
private void buildConstructor( TypeSpec.Builder typeBuilder ) {
        MethodSpec.Builder constructorBuilder = MethodSpec.constructorBuilder().addModifiers( Modifier.PUBLIC );

        if ( !beanInfo.getParameterizedTypes().isEmpty() ) {
            Class mapperClass;
            String mapperNameFormat;
            if ( isSerializer() ) {
                mapperClass = Serializer.class;
                mapperNameFormat = TYPE_PARAMETER_SERIALIZER_FIELD_NAME;
            } else {
                mapperClass = Deserializer.class;
                mapperNameFormat = TYPE_PARAMETER_DESERIALIZER_FIELD_NAME;
            }

            for ( int i = 0; i < beanInfo.getParameterizedTypes().size(); i++ ) {
                JClassType argType = beanInfo.getParameterizedTypes().get( i );
                String mapperName = String.format( mapperNameFormat, i );
                TypeName mapperType = parameterizedName( mapperClass, argType );

                FieldSpec field = FieldSpec.builder( mapperType, mapperName, Modifier.PRIVATE, Modifier.FINAL ).build();
                typeBuilder.addField( field );

                ParameterSpec parameter = ParameterSpec.builder( mapperType, mapperName ).build();
                constructorBuilder.addParameter( parameter );
                constructorBuilder.addStatement( "this.$N = $N", field, parameter );
            }
        }

        typeBuilder.addMethod( constructorBuilder.build() );
    }
135812
@Nonnull
	public <V1 extends T1, V2 extends T2> LBiObjDblConsumerBuilder<T1, T2> casesOf(Class<V1> argC1, Class<V2> argC2, Consumer<LBiObjDblConsumerBuilder<V1, V2>> pcpConsumer) {
		PartialCase.The pc = partialCaseFactoryMethod((a1, a2, a3) -> (argC1 == null || argC1.isInstance(a1)) && (argC2 == null || argC2.isInstance(a2)));

		pc.specifySubCases((Consumer) pcpConsumer);
		return self();
	}
1040961
public static final Builder publicKey(Class<?> cls, String resource) {
        return new Builder().publicKey(cls, resource);
    }
775808
@Nonnull
	public static <T1, T2, R> LBiObjSrtFunction<T1, T2, R> biObjSrtFunctionFrom(Consumer<LBiObjSrtFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjSrtFunctionBuilder builder = new LBiObjSrtFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
729065
@Nonnull
	public static <T> LObjDblPredicate<T> objDblPredicateFrom(Consumer<LObjDblPredicateBuilder<T>> buildingFunction) {
		LObjDblPredicateBuilder builder = new LObjDblPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1298046
@Nonnull
	public static LLongToDblFunction longToDblFunctionFrom(Consumer<LLongToDblFunctionBuilder> buildingFunction) {
		LLongToDblFunctionBuilder builder = new LLongToDblFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}