本文整理汇总了Java中org.eclipse.jdt.internal.core.util.Util.equalArraysOrNull方法的典型用法代码示例。如果您正苦于以下问题:Java Util.equalArraysOrNull方法的具体用法?Java Util.equalArraysOrNull怎么用?Java Util.equalArraysOrNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.core.util.Util
的用法示例。
在下文中一共展示了Util.equalArraysOrNull方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateContent
import org.eclipse.jdt.internal.core.util.Util; //导入方法依赖的package包/类
/**
* Updates the content of <code>cu</code>, modifying the type name and/or package
* declaration as necessary.
*
* @return an AST rewrite or null if no rewrite needed
*/
private TextEdit updateContent(ICompilationUnit cu, PackageFragment dest, String newName) throws JavaModelException {
String[] currPackageName = ((PackageFragment) cu.getParent()).names;
String[] destPackageName = dest.names;
if (Util.equalArraysOrNull(currPackageName, destPackageName) && newName == null) {
return null; //nothing to change
} else {
// ensure cu is consistent (noop if already consistent)
cu.makeConsistent(this.progressMonitor);
this.parser.setSource(cu);
CompilationUnit astCU = (CompilationUnit) this.parser.createAST(this.progressMonitor);
AST ast = astCU.getAST();
ASTRewrite rewrite = ASTRewrite.create(ast);
updateTypeName(cu, astCU, cu.getElementName(), newName, rewrite);
updatePackageStatement(astCU, destPackageName, rewrite, cu);
return rewrite.rewriteAST();
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:CopyResourceElementsOperation.java
示例2: packageRegionContainsSamePackageFragment
import org.eclipse.jdt.internal.core.util.Util; //导入方法依赖的package包/类
/**
* Returns <code>true</code> if an equivalent package fragment is included in the package
* region. Package fragments are equivalent if they both have the same name.
*/
protected boolean packageRegionContainsSamePackageFragment(PackageFragment element) {
IJavaElement[] pkgs = this.packageRegion.getElements();
for (int i = 0; i < pkgs.length; i++) {
PackageFragment pkg = (PackageFragment) pkgs[i];
if (Util.equalArraysOrNull(pkg.names, element.names))
return true;
}
return false;
}
示例3: equals
import org.eclipse.jdt.internal.core.util.Util; //导入方法依赖的package包/类
public boolean equals(Object obj) {
if (!(obj instanceof MemberValuePair)) {
return false;
}
MemberValuePair other = (MemberValuePair) obj;
return
this.valueKind == other.valueKind
&& this.memberName.equals(other.memberName)
&& (this.value == other.value
|| (this.value != null && this.value.equals(other.value))
|| (this.value instanceof Object[] && other.value instanceof Object[] && Util.equalArraysOrNull((Object[])this.value, (Object[]) other.value)));
}
示例4: equals
import org.eclipse.jdt.internal.core.util.Util; //导入方法依赖的package包/类
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof PackageFragment)) return false;
PackageFragment other = (PackageFragment) o;
return Util.equalArraysOrNull(this.names, other.names) &&
this.parent.equals(other.parent);
}
示例5: equals
import org.eclipse.jdt.internal.core.util.Util; //导入方法依赖的package包/类
public boolean equals(Object o) {
if (!(o instanceof SourceMethod)) return false;
return super.equals(o) && Util.equalArraysOrNull(this.parameterTypes, ((SourceMethod)o).parameterTypes);
}
示例6: equals
import org.eclipse.jdt.internal.core.util.Util; //导入方法依赖的package包/类
public boolean equals(Object o) {
if (!(o instanceof BinaryMethod)) return false;
return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes());
}