001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.remoteable; 014 015import static org.apache.juneau.internal.ClassUtils.*; 016 017import org.apache.juneau.httppart.*; 018import org.apache.juneau.urlencoding.*; 019 020/** 021 * @deprecated Internal class. 022 */ 023@Deprecated 024public class RemoteMethodArg { 025 026 /** The argument name. Can be blank. */ 027 public final String name; 028 029 /** The zero-based index of the argument on the Java method. */ 030 public final int index; 031 032 /** The value is skipped if it's null/empty. */ 033 public final boolean skipIfNE; 034 035 /** The serializer used for converting objects to strings. */ 036 public final HttpPartSerializer serializer; 037 038 /** 039 * Constructor. 040 * 041 * @param name The argument name pulled from name(). 042 * @param name2 The argument name pulled from value(). 043 * @param index The zero-based index of the argument on the Java method. 044 * @param skipIfNE The value is skipped if it's null/empty. 045 * @param serializer 046 * The class to use for serializing headers, query parameters, form-data parameters, and path variables. 047 * If {@link UrlEncodingSerializer}, then the url-encoding serializer defined on the client will be used. 048 */ 049 protected RemoteMethodArg(String name, String name2, int index, boolean skipIfNE, Class<? extends HttpPartSerializer> serializer) { 050 this.name = name.isEmpty() ? name2 : name; 051 this.index = index; 052 this.skipIfNE = skipIfNE; 053 this.serializer = newInstance(HttpPartSerializer.class, serializer); 054 } 055}