コード例 #1
0
ファイル: JaxwsModule.java プロジェクト: stoicflame/enunciate
  public DataTypeDetectionStrategy getDataTypeDetectionStrategy() {
    String dataTypeDetection = this.config.getString("[@datatype-detection]", null);

    if (dataTypeDetection != null) {
      try {
        return DataTypeDetectionStrategy.valueOf(dataTypeDetection);
      } catch (IllegalArgumentException e) {
        // fall through...
      }
    }

    if (this.defaultDataTypeDetectionStrategy != null) {
      return this.defaultDataTypeDetectionStrategy;
    }

    if (this.enunciate.getIncludePatterns().isEmpty()) {
      // if there are no configured include patterns, then we'll just stick with "local" detection
      // so we don't include too much.
      return DataTypeDetectionStrategy.local;
    } else {
      // otherwise, we'll assume the user knows what (s)he's doing and aggressively include
      // everything.
      return DataTypeDetectionStrategy.aggressive;
    }
  }
コード例 #2
0
ファイル: JaxbModule.java プロジェクト: sg-ad/enunciate
  public DataTypeDetectionStrategy getDataTypeDetectionStrategy() {
    String dataTypeDetection = this.config.getString("[@datatype-detection]", null);

    if (dataTypeDetection != null) {
      try {
        return DataTypeDetectionStrategy.valueOf(dataTypeDetection);
      } catch (IllegalArgumentException e) {
        // fall through...
      }
    }

    return this.defaultDataTypeDetectionStrategy == null
        ? DataTypeDetectionStrategy.local
        : this.defaultDataTypeDetectionStrategy;
  }