码迷,mamicode.com
首页 >  
搜索关键字:reflection api使用    ( 1659个结果
单例模式的终结者——setAccessible(true)
先来看下“传统”的单例模式 package go.derek; public class Singleton{ public static int times; private Singleton(){ //构造器被调用的时候会打印出次数 System.out.println("单例构造器被调用"+(++times)+"两次"); } private final sta...
分类:数据库   时间:2014-11-02 00:37:50    阅读次数:167
getDeclaredConstructor()与getConstructor的区别
首先看getDeclaredConstructor(Class... parameterTypes)  这个方法会返回制定参数类型的所有构造器,包括public的和非public的,当然也包括private的。 getDeclaredConstructors()的返回结果就没有参数类型的过滤了。 再来看getConstructor(Class... parameterTypes) ...
分类:其他好文   时间:2014-11-01 19:15:11    阅读次数:276
C#写TXT文档
//C#写TXT文档 String strDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); ...
分类:Windows程序   时间:2014-11-01 14:47:07    阅读次数:190
jedis使用线程池封装redis基本操作
对jedis的api 使用线程池 进行 基本的封装...
分类:编程语言   时间:2014-10-31 22:20:31    阅读次数:255
ios开发 Reflection(三) 利用反射自动绑值
反射的具体应用,自动绑值获取属性列表 1 - (NSArray*)propertyKeys 2 { 3 unsigned int outCount, i; 4 objc_property_t *properties = class_copyPropertyList([self cla...
分类:移动开发   时间:2014-10-31 18:42:27    阅读次数:335
ios开发 Reflection(二)
反射机制可以获取的内容1.获取一个 类的所有属性 1 #pragma -mark 获取变量列表 2 3 -(void)getVarName 4 { 5 unsigned int numIvars; //成员变量个数 6 Ivar *vars = class_copyIvarList...
分类:移动开发   时间:2014-10-31 17:12:37    阅读次数:171
C# 简单的反射机制实例
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Collections;using ConsoleApplic...
分类:Windows程序   时间:2014-10-31 11:35:44    阅读次数:226
System.Type类
usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; usingSystem.Reflection; namespaceConsoleApplication1 { classProgram { staticvoidMain(string[]args) { //System.Type类 //=========================获..
分类:其他好文   时间:2014-10-30 02:03:24    阅读次数:166
asp.net 使用JQuery 调用Ashx 后面直接写方法名,通过反射找到对应的方法
using System.Reflection;public class Industry_Manager : IHttpHandler{ HttpRequest gRequest = null; HttpContext gContext = null; HttpResponse ...
分类:Web程序   时间:2014-10-30 01:30:31    阅读次数:306
业界自动化框架简介
业界自动化框架简介1.基于坐标点击触屏:Monkeyrunner,北京博思自研工具Monkeyrunner:提供了一个API,使用此API写出的程序可以在Android代码之外控制Android设备和模拟器。通过monkeyrunner,您可以写出一个Python程序去安装一个Android应用程序...
分类:其他好文   时间:2014-10-30 00:08:15    阅读次数:242
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!