本文整理匯總了Java中java.beans.MethodDescriptor.getParameterDescriptors方法的典型用法代碼示例。如果您正苦於以下問題:Java MethodDescriptor.getParameterDescriptors方法的具體用法?Java MethodDescriptor.getParameterDescriptors怎麽用?Java MethodDescriptor.getParameterDescriptors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.beans.MethodDescriptor
的用法示例。
在下文中一共展示了MethodDescriptor.getParameterDescriptors方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: _createMergedMethodDescriptor
import java.beans.MethodDescriptor; //導入方法依賴的package包/類
private static MethodDescriptor _createMergedMethodDescriptor(
MethodDescriptor secondaryDescriptor,
MethodDescriptor primaryDescriptor
)
{
ParameterDescriptor[] parameterDescriptors =
primaryDescriptor.getParameterDescriptors();
if (parameterDescriptors == null)
{
parameterDescriptors = secondaryDescriptor.getParameterDescriptors();
}
MethodDescriptor mergedDescriptor = new MethodDescriptor(
primaryDescriptor.getMethod(),
parameterDescriptors);
// merge the superclasses
_mergeFeatureDescriptors(secondaryDescriptor,
primaryDescriptor,
mergedDescriptor);
return mergedDescriptor;
}
示例2: _cloneMethodDescriptor
import java.beans.MethodDescriptor; //導入方法依賴的package包/類
private static MethodDescriptor _cloneMethodDescriptor(
MethodDescriptor oldDescriptor
)
{
try
{
MethodDescriptor newDescriptor = new MethodDescriptor(
oldDescriptor.getMethod(),
oldDescriptor.getParameterDescriptors());
// copy the rest of the attributes
_copyFeatureDescriptor(oldDescriptor, newDescriptor);
return newDescriptor;
}
catch (Exception e)
{
_LOG.severe(e);
return null;
}
}
示例3: testMethodDescriptor
import java.beans.MethodDescriptor; //導入方法依賴的package包/類
private static void testMethodDescriptor() {
try {
ParameterDescriptor[] array = { new ParameterDescriptor() };
MethodDescriptor descriptor = new MethodDescriptor(MyDPD.class.getMethod("getArray"), array);
test(descriptor.getParameterDescriptors());
array[0] = null;
test(descriptor.getParameterDescriptors());
descriptor.getParameterDescriptors()[0] = null;
test(descriptor.getParameterDescriptors());
}
catch (Exception exception) {
throw new Error("unexpected error", exception);
}
}
示例4: print
import java.beans.MethodDescriptor; //導入方法依賴的package包/類
private static void print(MethodDescriptor[] mds) {
System.out.println(mds.length + " method descriptors");
Arrays.sort(mds, new Test4058433());
for (MethodDescriptor md : mds) {
print(md);
print("method", md.getMethod());
ParameterDescriptor[] pds = md.getParameterDescriptors();
if (pds != null) {
System.out.println(pds.length + " parameter descriptors");
for (ParameterDescriptor pd : pds) {
print(pd);
}
}
}
}