本文整理汇总了Java中org.openide.util.Parameters.notWhitespace方法的典型用法代码示例。如果您正苦于以下问题:Java Parameters.notWhitespace方法的具体用法?Java Parameters.notWhitespace怎么用?Java Parameters.notWhitespace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.util.Parameters
的用法示例。
在下文中一共展示了Parameters.notWhitespace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import org.openide.util.Parameters; //导入方法依赖的package包/类
/**
* Creates new instance of method model. None of the parameters can be null.
*
* @param name name of the method, must be valid Java identifier
* @param returnType name of return type as written in source code,
* for non-primitive types fully-qualfied name must be used,
* must contain at least one non-whitespace character
* @param body string representation of body, can be null
* @param parameters list of method parameters, can be empty
* @param exceptions list of exceptions represented by fully-qualified names of exceptions, can be empty
* @param modifiers list of modifiers of method, can be empty
* @throws NullPointerException if any of the parameters is <code>null</code>.
* @throws IllegalArgumentException if the paramter returnType does not contain at least one non-whitespace character
* or the parameter name is not a valid Java identifier
* @return immutable model of method
*/
public static MethodModel create(String name, String returnType, String body, List<Variable> parameters, List<String> exceptions, Set<Modifier> modifiers) {
Parameters.javaIdentifier("name", name);
Parameters.notWhitespace("returnType", returnType);
Parameters.notNull("parameters", parameters);
Parameters.notNull("exceptions", exceptions);
Parameters.notNull("modifiers", modifiers);
return new MethodModel(name, returnType, body, parameters, exceptions, modifiers, Collections.<Annotation>emptyList());
}
示例2: derive
import org.openide.util.Parameters; //导入方法依赖的package包/类
/**
* Derives a FoldType which acts as a child of this instance.
* The FoldType will be treated as a special case of this instance. If A is the returned
* instance and B is this instance, then A.isKindOf(B) will return true.
* <p/>
*
* @param code new code for the FoldType
* @param label human-readable label that describes the FoldType. If {@code null}, the original label will be used.
* @param template human-readable label that describes the FoldType. If {@code null}, the original template will be used.
* @return an instance of child FoldType
* @since 1.35
*/
public FoldType derive(String code, String label, FoldTemplate template) {
Parameters.notWhitespace("code", code);
if (template == null) {
template = this.template;
}
return new FoldType(code, label, template, this);
}
示例3: create
import org.openide.util.Parameters; //导入方法依赖的package包/类
/**
* Creates an instance of FoldType.
* The code, label and template parameters will be assigned to the FoldType's properties.
*
* @param code code used to form, e.g. persistent keys for info related to the FoldType. Cannot be {@code null}.
* @param label human-readable label that identifies the FoldType. Must not be {@code null}.
* @param template describes how the fold is presented. If {@code null}, {@link FoldTemplate#DEFAULT} will be used.
* @return FoldType instance
* @since 1.35
*/
public static FoldType create(String code, String label, FoldTemplate template) {
Parameters.notWhitespace("code", code);
Parameters.notWhitespace("label", label);
return new FoldType(code, label, template, null);
}