當前位置: 首頁>>代碼示例>>Java>>正文


Java MethodDescriptor.getDisplayName方法代碼示例

本文整理匯總了Java中java.beans.MethodDescriptor.getDisplayName方法的典型用法代碼示例。如果您正苦於以下問題:Java MethodDescriptor.getDisplayName方法的具體用法?Java MethodDescriptor.getDisplayName怎麽用?Java MethodDescriptor.getDisplayName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.beans.MethodDescriptor的用法示例。


在下文中一共展示了MethodDescriptor.getDisplayName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getGlobalInfo

import java.beans.MethodDescriptor; //導入方法依賴的package包/類
/**
 * Return the global info (if it exists) for the supplied clusterer
 * 
 * @param clusterer the clusterer to get the global info for
 * @return the global info (synopsis) for the clusterer
 * @throws Exception if there is a problem reflecting on the clusterer
 */
protected static String getGlobalInfo(Clusterer clusterer) throws Exception {
  BeanInfo bi = Introspector.getBeanInfo(clusterer.getClass());
  MethodDescriptor[] methods;
  methods = bi.getMethodDescriptors();
  Object[] args = {};
  String result =
    "\nSynopsis for " + clusterer.getClass().getName() + ":\n\n";

  for (MethodDescriptor method : methods) {
    String name = method.getDisplayName();
    Method meth = method.getMethod();
    if (name.equals("globalInfo")) {
      String globalInfo = (String) (meth.invoke(clusterer, args));
      result += globalInfo;
      break;
    }
  }

  return result;
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:28,代碼來源:ClusterEvaluation.java

示例2: getGlobalInfo

import java.beans.MethodDescriptor; //導入方法依賴的package包/類
/**
 * Return the global info (if it exists) for the supplied classifier.
 * 
 * @param classifier the classifier to get the global info for
 * @return the global info (synopsis) for the classifier
 * @throws Exception if there is a problem reflecting on the classifier
 */
protected static String getGlobalInfo(Classifier classifier) throws Exception {
  BeanInfo bi = Introspector.getBeanInfo(classifier.getClass());
  MethodDescriptor[] methods;
  methods = bi.getMethodDescriptors();
  Object[] args = {};
  String result =
    "\nSynopsis for " + classifier.getClass().getName() + ":\n\n";

  for (MethodDescriptor method : methods) {
    String name = method.getDisplayName();
    Method meth = method.getMethod();
    if (name.equals("globalInfo")) {
      String globalInfo = (String) (meth.invoke(classifier, args));
      result += globalInfo;
      break;
    }
  }

  return result;
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:28,代碼來源:Evaluation.java

示例3: getGlobalInfo

import java.beans.MethodDescriptor; //導入方法依賴的package包/類
/**
 * Return the global info (if it exists) for the supplied clusterer
 * 
 * @param clusterer the clusterer to get the global info for
 * @return the global info (synopsis) for the clusterer
 * @throws Exception if there is a problem reflecting on the clusterer
 */
protected static String getGlobalInfo(Clusterer clusterer) throws Exception {
  BeanInfo bi = Introspector.getBeanInfo(clusterer.getClass());
  MethodDescriptor[] methods;
  methods = bi.getMethodDescriptors();
  Object[] args = {};
  String result = "\nSynopsis for " + clusterer.getClass().getName()
    + ":\n\n";

  for (MethodDescriptor method : methods) {
    String name = method.getDisplayName();
    Method meth = method.getMethod();
    if (name.equals("globalInfo")) {
      String globalInfo = (String) (meth.invoke(clusterer, args));
      result += globalInfo;
      break;
    }
  }

  return result;
}
 
開發者ID:umple,項目名稱:umple,代碼行數:28,代碼來源:ClusterEvaluation.java

示例4: getGlobalInfo

import java.beans.MethodDescriptor; //導入方法依賴的package包/類
/**
 * Return the global info (if it exists) for the supplied classifier.
 *
 * @param classifier the classifier to get the global info for
 * @return the global info (synopsis) for the classifier
 * @throws Exception if there is a problem reflecting on the classifier
 */
protected static String getGlobalInfo(Classifier classifier) throws Exception {
  BeanInfo bi = Introspector.getBeanInfo(classifier.getClass());
  MethodDescriptor[] methods;
  methods = bi.getMethodDescriptors();
  Object[] args = {};
  String result = "\nSynopsis for " + classifier.getClass().getName()
    + ":\n\n";

  for (MethodDescriptor method : methods) {
    String name = method.getDisplayName();
    Method meth = method.getMethod();
    if (name.equals("globalInfo")) {
      String globalInfo = (String) (meth.invoke(classifier, args));
      result += globalInfo;
      break;
    }
  }

  return result;
}
 
開發者ID:umple,項目名稱:umple,代碼行數:28,代碼來源:Evaluation.java

示例5: getGlobalInfo

import java.beans.MethodDescriptor; //導入方法依賴的package包/類
/**
 * Return the global info (if it exists) for the supplied classifier
 *
 * @param classifier the classifier to get the global info for
 * @return the global info (synopsis) for the classifier
 * @throws Exception if there is a problem reflecting on the classifier
 */
protected static String getGlobalInfo(Classifier classifier) throws Exception {
    BeanInfo bi = Introspector.getBeanInfo(classifier.getClass());
    MethodDescriptor[] methods;
    methods = bi.getMethodDescriptors();
    Object[] args = {};
    String result =
            "\nSynopsis for " + classifier.getClass().getName() + ":\n\n";

    for (MethodDescriptor method : methods) {
        String name = method.getDisplayName();
        Method meth = method.getMethod();
        if (name.equals("globalInfo")) {
            String globalInfo = (String) (meth.invoke(classifier, args));
            result += globalInfo;
            break;
        }
    }

    return result;
}
 
開發者ID:williamClanton,項目名稱:jbossBA,代碼行數:28,代碼來源:Evaluation.java


注:本文中的java.beans.MethodDescriptor.getDisplayName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。