public abstract class SimpleParamNameSignature extends Object implements Comparable<SimpleParamNameSignature>
A method or constructor signature, using only simple parameter-type names--this can be matched by a SimpleParamSigSearchTerm. This class is unrelated to SimpleMethodSignature.
aliteralmind __DASH__ github __AT__ yahoo __DOT__ com), dual-licensed under the LGPL (version 3.0 or later) or the ASL (version 2.0). See source code for details. http://codelet.aliteralmind.com, https://github.com/aliteralmind/codeletSimpleParamSigSearchTerm| Constructor and Description |
|---|
SimpleParamNameSignature(Member cnstr_method,
Class<?>[] param_types)
Create a new instance from a constructor or method, and its parameter class types.
|
SimpleParamNameSignature(Member cnstr_method,
List<String> type_list)
Create a new instance from a method or constructor, and an array of its parameter simple names.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SimpleParamNameSignature to_compareTo) |
Member |
getMember()
The method or constructor having these parameters.
|
abstract String |
getMethodName()
If a method: its name, if a constructor: the empty string (
""). |
String |
getNoParens()
Comma-delimited string of all parameter-type simple names, excluding the surrounding parentheses.
|
List<String> |
getParamNameList()
List of all parameter-type simple names.
|
static List<String> |
getSimpleNameListFromClasses(Class<?>[] types)
Create a list of all simple names from a class array.
|
String |
getWithParens()
Comma-delimited string of all parameter-type simple names, listed in the same order as declared, including the surrounding parentheses.
|
String |
toString() |
public SimpleParamNameSignature(Member cnstr_method, Class<?>[] param_types)
Create a new instance from a constructor or method, and its parameter class types.
Equal to
this(false, cnstr_method,
SimpleParamNameSignature.getSimpleNameListFromClasses(param_types))
public SimpleParamNameSignature(Member cnstr_method, List<String> type_list)
Create a new instance from a method or constructor, and an array of its parameter simple names.
This sets
getParamNameList() to an immutable string-list of all parameter type names.getWithParens() to a comma-delimited string of the each type's simple names, in the same order as in types, surrounded by parentheses.getNoParens() to the same comma-delimited list, with no paretheses.Class.getSimpleName()public Member getMember()
The method or constructor having these parameters.
null method or constructor object.public List<String> getParamNameList()
List of all parameter-type simple names.
getWithParens(),
SimpleParamNameSignature(Member, List),
Class.getSimpleName()public String getNoParens()
Comma-delimited string of all parameter-type simple names, excluding the surrounding parentheses.
null, comma-delimited string of all simple type names, in the same order as declared, with a single space between each comma.getWithParens()public String getWithParens()
Comma-delimited string of all parameter-type simple names, listed in the same order as declared, including the surrounding parentheses.
null, comma-delimited string of all simple type names, in the same order as declared, with a single space between each comma.getParamNameList(),
getNoParens(),
toString()public abstract String getMethodName()
If a method: its name, if a constructor: the empty string ("").
public String toString()
toString in class ObjectgetMethodName() + getWithParens()public int compareTo(SimpleParamNameSignature to_compareTo)
compareTo in interface Comparable<SimpleParamNameSignature>getWithParens().compareTo(to_compareTo.getWithParens()) (This does not need to be overriden to include the constructor/function name. This is only for sorting parameter-lists within each constructor/method.)public static final List<String> getSimpleNameListFromClasses(Class<?>[] types)
Create a list of all simple names from a class array.
types - May not be null.types.SimpleParamNameSignature(Member, Class[])Copyright 2014, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
https://github.com/aliteralmind/codelet