本文整理了Java中java.lang.Package.hashCode()
方法的一些代码示例,展示了Package.hashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Package.hashCode()
方法的具体详情如下:
包路径:java.lang.Package
类名称:Package
方法名:hashCode
[英]Return the hash code computed from the package name.
[中]返回从包名计算出的哈希代码。
代码示例来源:origin: com.google.inject/guice
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: redisson/redisson
public static Field[] getAccessibleFields(Class clazz, Class limit) {
Package topPackage = clazz.getPackage();
List<Field> fieldList = new ArrayList<>();
int topPackageHash = topPackage == null ? 0 : topPackage.hashCode();
boolean top = true;
do {
int pckgHash = pckg == null ? 0 : pckg.hashCode();
if (pckgHash == topPackageHash) {
addFieldIfNotExist(fieldList, field);
代码示例来源:origin: redisson/redisson
Package topPackage = clazz.getPackage();
List<Method> methodList = new ArrayList<>();
int topPackageHash = topPackage == null ? 0 : topPackage.hashCode();
boolean top = true;
do {
int pckgHash = pckg == null ? 0 : pckg.hashCode();
if (pckgHash == topPackageHash) {
addMethodIfNotExist(methodList, method);
代码示例来源:origin: oblac/jodd
public static Field[] getAccessibleFields(Class clazz, final Class limit) {
Package topPackage = clazz.getPackage();
List<Field> fieldList = new ArrayList<>();
int topPackageHash = topPackage == null ? 0 : topPackage.hashCode();
boolean top = true;
do {
int pckgHash = pckg == null ? 0 : pckg.hashCode();
if (pckgHash == topPackageHash) {
addFieldIfNotExist(fieldList, field);
代码示例来源:origin: oblac/jodd
Package topPackage = clazz.getPackage();
List<Method> methodList = new ArrayList<>();
int topPackageHash = topPackage == null ? 0 : topPackage.hashCode();
boolean top = true;
do {
int pckgHash = pckg == null ? 0 : pckg.hashCode();
if (pckgHash == topPackageHash) {
addMethodIfNotExist(methodList, method);
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: com.jwebmp.inject/guice
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: com.google/inject
@Override public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: org.sonatype.sisu/sisu-guice
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.inject
@Override public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: org.xbib/guice
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: harbby/presto-connectors
@Override
public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: Nextdoor/bender
@Override public int hashCode() {
return 37 * targetPackage.hashCode();
}
代码示例来源:origin: org.pojomatic/pojomatic
@Override
public int hashCode() {
return name.hashCode() * 31 + pakage.hashCode();
}
代码示例来源:origin: fivesmallq/web-data-extractor
public static Field[] getAccessibleFields(Class clazz, Class limit) {
Package topPackage = clazz.getPackage();
List<Field> fieldList = new ArrayList<>();
int topPackageHash = topPackage == null ? 0 : topPackage.hashCode();
boolean top = true;
do {
int pckgHash = pckg == null ? 0 : pckg.hashCode();
if (pckgHash == topPackageHash) {
addFieldIfNotExist(fieldList, field);
代码示例来源:origin: EvoSuite/evosuite
/**
* Before a new class is defined, we need to create a package definition for it
*
* @param className
*/
private void createPackageDefinition(String className){
int i = className.lastIndexOf('.');
if (i != -1) {
String pkgname = className.substring(0, i);
// Check if package already loaded.
Package pkg = getPackage(pkgname);
if(pkg==null){
definePackage(pkgname, null, null, null, null, null, null, null);
logger.info("Defined package (3): "+getPackage(pkgname)+", "+getPackage(pkgname).hashCode());
}
}
}
代码示例来源:origin: EvoSuite/evosuite
/**
* Before a new class is defined, we need to create a package definition for it
*
* @param className
*/
private void createPackageDefinition(String className){
int i = className.lastIndexOf('.');
if (i != -1) {
String pkgname = className.substring(0, i);
// Check if package already loaded.
Package pkg = getPackage(pkgname);
if(pkg==null){
definePackage(pkgname, null, null, null, null, null, null, null);
logger.info("Defined package (3): "+getPackage(pkgname)+", "+getPackage(pkgname).hashCode());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!