コード例 #1
0
 /**
  * Returns the current value of the property. Simple values (byte, int, etc.) are boxed (into
  * Byte, Integer, etc.). Returns null if an error occurs or if the index is out of the range [0
  * ... numProperties() - 1 ]
  */
 public Object getValue(int index) {
   if (auxillary != null) return auxillary.getValue(index);
   if (index < 0 || index >= numProperties()) return null;
   try {
     return ((Method) (getMethods.get(index))).invoke(object, new Object[0]);
   } catch (Exception e) {
     e.printStackTrace();
     return null;
   }
 }
コード例 #2
0
ファイル: Domain.java プロジェクト: sgoretti/vertigo
  private static Properties buildProperties(
      final List<ConstraintDefinition> constraintDefinitions, final Properties inputProperties) {
    final PropertiesBuilder propertiesBuilder = new PropertiesBuilder();
    for (final Property property : inputProperties.getProperties()) {
      propertiesBuilder.addValue(property, inputProperties.getValue(property));
    }

    // On récupère les propriétés d'après les contraintes
    for (final ConstraintDefinition constraintDefinition : constraintDefinitions) {
      propertiesBuilder.addValue(
          constraintDefinition.getProperty(), constraintDefinition.getPropertyValue());
    }
    return propertiesBuilder.build();
  }
コード例 #3
0
ファイル: C.java プロジェクト: mxlydx/payhome
  /** 系统初始化时执行 */
  public static void initialize() {

    // common.properties
    ENCODE_UTF_8 = Properties.getValue(FILE_COMMON, "ENCODE_UTF_8", "");
    ENCODE_ISO_88591 = Properties.getValue(FILE_COMMON, "ENCODE_ISO_88591", "");
    MAX_UPLOAD_SIZE = Long.valueOf(Properties.getValue(FILE_COMMON, "MAX_UPLOAD_SIZE", "0"));
    CONTENT_TYPE_HTML = Properties.getValue(FILE_COMMON, "CONTENT_TYPE_HTML", "");
    CONTENT_TYPE_JSON = Properties.getValue(FILE_COMMON, "CONTENT_TYPE_JSON", "");
    CONTENT_TYPE_STREAM = Properties.getValue(FILE_COMMON, "CONTENT_TYPE_STREAM", "");
    CONTENT_TYPE_URLENCODED = Properties.getValue(FILE_COMMON, "CONTENT_TYPE_URLENCODED", "");
    CHARSET_UTF_8 = Properties.getValue(FILE_COMMON, "CHARSET_UTF_8", "");
    CONTENT_TYPE_HTML_UTF_8 = Properties.getValue(FILE_COMMON, "CONTENT_TYPE_HTML_UTF_8", "");
    CONTENT_TYPE_JSON_UTF_8 = Properties.getValue(FILE_COMMON, "CONTENT_TYPE_JSON_UTF_8", "");
    CONTENT_TYPE_STREAM_UTF_8 = Properties.getValue(FILE_COMMON, "CONTENT_TYPE_STREAM_UTF_8", "");
    CONTENT_TYPE_URLENCODED_UTF_8 =
        Properties.getValue(FILE_COMMON, "CONTENT_TYPE_URLENCODED_UTF_8", "");
    CONTENT_DISPOSITION = Properties.getValue(FILE_COMMON, "CONTENT_DISPOSITION", "");
    YYYYMMDDHHMMSSSSS_24 = Properties.getValue(FILE_COMMON, "YYYYMMDDHHMMSSSSS_24", "");
    YYYYMMDDHHMMSSSSS_12 = Properties.getValue(FILE_COMMON, "YYYYMMDDHHMMSSSSS_12", "");
    UPLOAD_PROGRESS_LISTENER_KEY =
        Properties.getValue(FILE_COMMON, "UPLOAD_PROGRESS_LISTENER_KEY", "");
    AUTO_UPDATE_SEG = Properties.getValue(FILE_COMMON, "AUTO_UPDATE_SEG", "");
    LINE_CHART_HEIGHT = Properties.getValue(FILE_COMMON, "LINE_CHART_HEIGHT", "");
  }