Skip to content

Commit

Permalink
add java doc to dubbo-config-api (#3103)
Browse files Browse the repository at this point in the history
* add config-api javadoc

* add dubbo-config-api javadoc

* update javadoc

* add dubbo-config-api java doc
  • Loading branch information
lixiaojiee authored and beiwei30 committed Jan 2, 2019
1 parent e172b29 commit 95ebfe8
Show file tree
Hide file tree
Showing 21 changed files with 1,523 additions and 930 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,55 @@ public abstract class AbstractConfig implements Serializable {

protected static final Logger logger = LoggerFactory.getLogger(AbstractConfig.class);
private static final long serialVersionUID = 4267533505537413570L;

/**
* The maximum length of a <b>parameter's value</b>
*/
private static final int MAX_LENGTH = 200;

/**
* The maximum length of a <b>path</b>
*/
private static final int MAX_PATH_LENGTH = 200;

/**
* The rule qualification for <b>name</b>
*/
private static final Pattern PATTERN_NAME = Pattern.compile("[\\-._0-9a-zA-Z]+");

/**
* The rule qualification for <b>multiply name</b>
*/
private static final Pattern PATTERN_MULTI_NAME = Pattern.compile("[,\\-._0-9a-zA-Z]+");

/**
* The rule qualification for <b>method names</b>
*/
private static final Pattern PATTERN_METHOD_NAME = Pattern.compile("[a-zA-Z][0-9a-zA-Z]*");

/**
* The rule qualification for <b>path</b>
*/
private static final Pattern PATTERN_PATH = Pattern.compile("[/\\-$._0-9a-zA-Z]+");

/**
* The pattern matches a value who has a symbol
*/
private static final Pattern PATTERN_NAME_HAS_SYMBOL = Pattern.compile("[:*,\\s/\\-._0-9a-zA-Z]+");

/**
* The pattern matches a property key
*/
private static final Pattern PATTERN_KEY = Pattern.compile("[*,\\-._0-9a-zA-Z]+");

/**
* The legacy properties container
*/
private static final Map<String, String> legacyProperties = new HashMap<String, String>();

/**
* The suffix container
*/
private static final String[] SUFFIXES = new String[]{"Config", "Bean"};

static {
Expand All @@ -82,6 +115,9 @@ public abstract class AbstractConfig implements Serializable {
DubboShutdownHook.getDubboShutdownHook().register();
}

/**
* The config id
*/
protected String id;
protected String prefix;

Expand Down Expand Up @@ -278,6 +314,14 @@ protected static void checkExtension(Class<?> type, String property, String valu
}
}

/**
* Check whether there is a <code>Extension</code> who's name (property) is <code>value</code> (special treatment is
* required)
*
* @param type The Extension type
* @param property The extension key
* @param value The Extension name
*/
protected static void checkMultiExtension(Class<?> type, String property, String value) {
checkMultiName(property, value);
if (StringUtils.isNotEmpty(value)) {
Expand Down
Loading

0 comments on commit 95ebfe8

Please sign in to comment.