当前位置: 首页>>代码示例>>Java>>正文


Java Method.hashCode方法代码示例

本文整理汇总了Java中java.lang.reflect.Method.hashCode方法的典型用法代码示例。如果您正苦于以下问题:Java Method.hashCode方法的具体用法?Java Method.hashCode怎么用?Java Method.hashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.lang.reflect.Method的用法示例。


在下文中一共展示了Method.hashCode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: EventHandler

import java.lang.reflect.Method; //导入方法依赖的package包/类
public EventHandler(Object target, Method method) {
    if (target == null) {
        throw new NullPointerException("EventHandler target cannot be null.");
    }

    if (method == null) {
        throw new NullPointerException("EventHandler method cannot be null.");
    }

    this.target = target;
    this.method = method;

    method.setAccessible(true);

    // Compute hash code eagerly since we know it will be used frequently and we cannot estimate the runtime of the
    // target's hashCode call.
    final int prime = 31;
    hashCode = (prime + method.hashCode()) * prime + target.hashCode();
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:20,代码来源:EventHandler.java

示例2: RxEventProducer

import java.lang.reflect.Method; //导入方法依赖的package包/类
RxEventProducer(Object target, Method method) {
    if (target == null) {
        throw new NullPointerException("EventProducer target cannot be null.");
    }
    if (method == null) {
        throw new NullPointerException("EventProducer method cannot be null.");
    }

    this.target = target;
    this.method = method;
    method.setAccessible(true);

    // Compute hash code eagerly since we know it will be used frequently and we cannot estimate the runtime of the
    // target's hashCode call.
    final int prime = 31;
    hashCode = (prime + method.hashCode()) * prime + target.hashCode();
}
 
开发者ID:SysdataSpA,项目名称:UniversalEventBus,代码行数:18,代码来源:RxEventProducer.java

示例3: RxEventHandler

import java.lang.reflect.Method; //导入方法依赖的package包/类
RxEventHandler(Object target, Method method) {
    if (target == null) {
        throw new NullPointerException("EventHandler target cannot be null.");
    }
    if (method == null) {
        throw new NullPointerException("EventHandler method cannot be null.");
    }

    this.target = target;
    this.method = method;
    method.setAccessible(true);

    // Compute hash code eagerly since we know it will be used frequently and we cannot estimate the runtime of the
    // target's hashCode call.
    final int prime = 31;
    hashCode = (prime + method.hashCode()) * prime + target.hashCode();
}
 
开发者ID:SysdataSpA,项目名称:UniversalEventBus,代码行数:18,代码来源:RxEventHandler.java

示例4: EventProducer

import java.lang.reflect.Method; //导入方法依赖的package包/类
EventProducer(Object target, Method method) {
  if (target == null) {
    throw new NullPointerException("EventProducer target cannot be null.");
  }
  if (method == null) {
    throw new NullPointerException("EventProducer method cannot be null.");
  }

  this.target = target;
  this.method = method;
  method.setAccessible(true);

  // Compute hash code eagerly since we know it will be used frequently and we cannot estimate the runtime of the
  // target's hashCode call.
  final int prime = 31;
  hashCode = (prime + method.hashCode()) * prime + target.hashCode();
}
 
开发者ID:benniaobuguai,项目名称:android-project-gallery,代码行数:18,代码来源:EventProducer.java

示例5: EventHandler

import java.lang.reflect.Method; //导入方法依赖的package包/类
EventHandler(Object target, Method method) {
  if (target == null) {
    throw new NullPointerException("EventHandler target cannot be null.");
  }
  if (method == null) {
    throw new NullPointerException("EventHandler method cannot be null.");
  }

  this.target = target;
  this.method = method;
  method.setAccessible(true);

  // Compute hash code eagerly since we know it will be used frequently and we cannot estimate the runtime of the
  // target's hashCode call.
  final int prime = 31;
  hashCode = (prime + method.hashCode()) * prime + target.hashCode();
}
 
开发者ID:benniaobuguai,项目名称:android-project-gallery,代码行数:18,代码来源:EventHandler.java

示例6: MethodCacheKey

import java.lang.reflect.Method; //导入方法依赖的package包/类
public MethodCacheKey(Method method) {
	this.method = method;
	this.hashCode = method.hashCode();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:AdvisedSupport.java


注:本文中的java.lang.reflect.Method.hashCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。