Skip to content

Commit

Permalink
Reformat java files using IntelliJ styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Zhou committed Jun 12, 2012
1 parent f0b1c81 commit b123218
Show file tree
Hide file tree
Showing 1,157 changed files with 26,627 additions and 31,952 deletions.
63 changes: 63 additions & 0 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface ExpressionContext {
/**
* 添加一个值。
*
* @param key 键
* @param key
* @param value 对应的值
*/
void put(String key, Object value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
public class ExpressionParseException extends Exception {
private static final long serialVersionUID = 3905519419391424825L;

/**
* 创建一个异常。
*/
/** 创建一个异常。 */
public ExpressionParseException() {
super();
}
Expand All @@ -45,7 +43,7 @@ public ExpressionParseException(String message) {
* 创建一个异常。
*
* @param message 异常信息
* @param cause 异常原因
* @param cause 异常原因
*/
public ExpressionParseException(String message, Throwable cause) {
super(message, cause);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
* @author Michael Zhou
*/
public class CompositeExpression extends ExpressionSupport {
private String expr;
private String expr;
private Expression[] expressions;

/**
* 创建一个组合的表达式。
*
* @param expr 表达式字符串
* @param expr 表达式字符串
* @param expressions 表达式列表
*/
public CompositeExpression(String expr, List<Expression> expressions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
public class CompositeExpressionFactory implements ExpressionFactory {
private ExpressionFactory factory;

/**
* 创建一个组合表达式的工厂,默认使用<code>JexlExpressionFactory</code>来解析子表达式。
*/
/** 创建一个组合表达式的工厂,默认使用<code>JexlExpressionFactory</code>来解析子表达式。 */
public CompositeExpressionFactory() {
this.factory = new JexlExpressionFactory();
}
Expand Down Expand Up @@ -91,7 +89,8 @@ public Expression createExpression(String expr) throws ExpressionParseException
StringBuffer chars = new StringBuffer();
StringBuffer exprBuff = new StringBuffer();

MAIN: while (i < length) {
MAIN:
while (i < length) {
ch = expr.charAt(i);

switch (ch) {
Expand Down Expand Up @@ -124,7 +123,8 @@ public Expression createExpression(String expr) throws ExpressionParseException
exprBuff.append(ch);
++i;

DOUBLE_QUOTE: while (i < length) {
DOUBLE_QUOTE:
while (i < length) {
ch = expr.charAt(i);

switch (ch) {
Expand Down Expand Up @@ -154,7 +154,8 @@ public Expression createExpression(String expr) throws ExpressionParseException
exprBuff.append(ch);
++i;

SINGLE_QUOTE: while (i < length) {
SINGLE_QUOTE:
while (i < length) {
ch = expr.charAt(i);

switch (ch) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
public class ConstantExpression extends ExpressionSupport {
private Object value;

/**
* 创建一个常量表达式。
*/
/** 创建一个常量表达式。 */
public ConstantExpression() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@

import static com.alibaba.citrus.util.Assert.*;

import com.alibaba.citrus.expr.ExpressionContext;
import com.alibaba.citrus.expr.support.ExpressionSupport;
import org.apache.commons.jexl2.Expression;
import org.apache.commons.jexl2.JexlContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.citrus.expr.ExpressionContext;
import com.alibaba.citrus.expr.support.ExpressionSupport;

/**
* 代表一个jexl表达式。
*
Expand Down Expand Up @@ -81,9 +80,7 @@ public Object evaluate(ExpressionContext context) {
}
}

/**
* 将<code>ExpressionContext</code>适配到<code>JexlContext</code>。
*/
/** 将<code>ExpressionContext</code>适配到<code>JexlContext</code>。 */
private static class JexlContextAdapter implements JexlContext {
private ExpressionContext expressionContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@

package com.alibaba.citrus.expr.jexl;

import org.apache.commons.jexl2.JexlEngine;

import com.alibaba.citrus.expr.Expression;
import com.alibaba.citrus.expr.ExpressionContext;
import com.alibaba.citrus.expr.ExpressionFactory;
import com.alibaba.citrus.expr.ExpressionParseException;
import com.alibaba.citrus.expr.support.ExpressionSupport;
import org.apache.commons.jexl2.JexlEngine;

/**
* 创建<code>JexlExpression</code>的工厂。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Object get(String key) {
/**
* 添加一个值。
*
* @param key 键
* @param key
* @param value 对应的值
*/
public void put(String key, Object value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@

import java.util.Date;

import org.junit.Before;
import org.junit.Test;

import com.alibaba.citrus.expr.composite.CompositeExpressionFactory;
import com.alibaba.citrus.expr.support.MappedExpressionContext;
import org.junit.Before;
import org.junit.Test;

/**
* 测试<code>CompositeExpression</code>。
Expand All @@ -35,7 +34,7 @@
public class CompositeExpressionTests {
private ExpressionFactory factory;
private ExpressionContext context;
private Date now;
private Date now;

@Before
public void init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@

import java.util.Date;

import org.junit.Before;
import org.junit.Test;

import com.alibaba.citrus.expr.jexl.JexlExpressionFactory;
import com.alibaba.citrus.expr.support.MappedExpressionContext;
import com.alibaba.citrus.util.MessageUtil;
import org.junit.Before;
import org.junit.Test;

/**
* 测试<code>JexlExpression</code>。
Expand All @@ -36,7 +35,7 @@
public class JexlExpressionTests {
private ExpressionFactory factory;
private ExpressionContext context;
private Date now;
private Date now;

@Before
public void init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* 代表一个带数字索引的property。常见的形式是: </p>
*
* <p/>
* <pre>
* public String getElement(int index);
*
Expand All @@ -33,13 +33,9 @@
* @author Michael Zhou
*/
public interface IndexedPropertyInfo extends PropertyInfo {
/**
* 取得property的值。
*/
/** 取得property的值。 */
Object getValue(Object object, int index);

/**
* 设置property的值。
*/
/** 设置property的值。 */
void setValue(Object object, int index, Object value);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@
public abstract class Introspector {
private final static Factory factory = newFactory();

/**
* 取得类型对应的{@link Introspector}。
*/
/** 取得类型对应的{@link Introspector}。 */
public static Introspector getInstance(TypeInfo type) {
return factory.getInstance(type);
}

/**
* 取得所有的properties信息。
*/
/** 取得所有的properties信息。 */
public abstract Map<String, List<PropertyInfo>> getProperties();

/**
Expand Down Expand Up @@ -126,16 +122,12 @@ private <T extends PropertyInfo> T findProperty(Class<T> propertyType, String pr
return null;
}

/**
* 用于创建{@link Introspector}。
*/
/** 用于创建{@link Introspector}。 */
protected static interface Factory {
Introspector getInstance(TypeInfo type);
}

/**
* 创建factory,但避免在compile时刻依赖impl package。
*/
/** 创建factory,但避免在compile时刻依赖impl package。 */
private static Factory newFactory() {
String factoryImplName = Factory.class.getPackage().getName() + ".impl.IntrospectorImpl$FactoryImpl";
Factory factoryImpl = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* 代表一个带字符串键值映射的property。常见的形式是: </p>
*
* <p/>
* <pre>
* public String getElement(String key);
*
Expand All @@ -33,13 +33,9 @@
* @author Michael Zhou
*/
public interface MappedPropertyInfo extends PropertyInfo {
/**
* 取得property的值。
*/
/** 取得property的值。 */
Object getValue(Object object, String key);

/**
* 设置property的值。
*/
/** 设置property的值。 */
void setValue(Object object, String key, Object value);
}
Loading

0 comments on commit b123218

Please sign in to comment.