本文整理了Java中org.eclipse.jdt.core.dom.CompilationUnit.hashCode()
方法的一些代码示例,展示了CompilationUnit.hashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CompilationUnit.hashCode()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.dom.CompilationUnit
类名称:CompilationUnit
方法名:hashCode
暂无
代码示例来源:origin: org.jboss.forge/roaster-jdt
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((body == null) ? 0 : body.hashCode());
result = prime * result + ((document == null) ? 0 : document.hashCode());
result = prime * result + ((enclosingType == null) ? 0 : enclosingType.hashCode());
result = prime * result + ((unit == null) ? 0 : unit.hashCode());
return result;
}
代码示例来源:origin: org.jboss.forge/roaster-jdt
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((pkg == null) ? 0 : pkg.hashCode());
result = prime * result + ((document == null) ? 0 : document.hashCode());
result = prime * result + ((enclosingType == null) ? 0 : enclosingType.hashCode());
result = prime * result + ((unit == null) ? 0 : unit.hashCode());
return result;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation
/**
* Returns a string for the given AST used for debugging.
*
* @param ast the compilation unit AST
* @return a string used for debugging
*/
private String toString(CompilationUnit ast) {
if (ast == null)
return "null"; //$NON-NLS-1$
List<AbstractTypeDeclaration> types= ast.types();
if (types != null && types.size() > 0)
return types.get(0).getName().getIdentifier() + "(" + ast.hashCode() + ")"; //$NON-NLS-1$//$NON-NLS-2$
else
return "AST without any type"; //$NON-NLS-1$
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Returns a string for the given AST used for debugging.
*
* @param ast the compilation unit AST
* @return a string used for debugging
*/
private String toString(CompilationUnit ast) {
if (ast == null)
return "null"; //$NON-NLS-1$
List<AbstractTypeDeclaration> types= ast.types();
if (types != null && types.size() > 0)
return types.get(0).getName().getIdentifier() + "(" + ast.hashCode() + ")"; //$NON-NLS-1$//$NON-NLS-2$
else
return "AST without any type"; //$NON-NLS-1$
}
内容来源于网络,如有侵权,请联系作者删除!