• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# lang.Class类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中java.lang.Class的典型用法代码示例。如果您正苦于以下问题:C# Class类的具体用法?C# Class怎么用?C# Class使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Class类属于java.lang命名空间,在下文中一共展示了Class类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: JUnit4ClassRunner

 public JUnit4ClassRunner(Class klass)
 {
   JUnit4ClassRunner junit4ClassRunner = this;
   this.fTestClass = new TestClass(klass);
   this.fTestMethods = this.getTestMethods();
   this.validate();
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:JUnit4ClassRunner.cs


示例2: DotnetBaseClassFieldExtractor

        public DotnetBaseClassFieldExtractor(Class clazz, string fieldName)
            : base(null, null)
        {
            Type type = null;
            foreach (Assembly assem in AppDomain.CurrentDomain.GetAssemblies())
            {
                type = assem.GetType(clazz.getName().Replace("cli.", ""));
                if(type != null)
                    break;
            }

            this.fieldName = fieldName;
            FieldInfo[] info = type.GetFields();
            string fieldType = type.GetProperty(fieldName).PropertyType.FullName;

            //string originalClassName = clazz.getName().Replace('.', '/');
            //string className = CSClassFieldExtractorFactory.BASE_PACKAGE + "/" + originalClassName + "$" + fieldName;
            try {
                    //this.index = getIndex(type, fieldName);
                    this.index = FieldIndexGenerator.getIndex();
                    this.fieldType = type.GetProperty(fieldName).PropertyType;
                    this.objectType = DotnetClassFieldExtractorFactory.getClassObjectType( this.fieldType );
            } catch ( System.Exception e ) {
                throw new RuntimeDroolsException( e );
            }
        }
开发者ID:happy280684,项目名称:droolsdotnet,代码行数:26,代码来源:DotnetBaseClassFieldExtractor.cs


示例3: EnumCreatureType

 private EnumCreatureType(string s, int i, Class class1, int j, Material material, bool flag)
 {
     creatureClass = class1;
     maxNumberOfCreature = j;
     creatureMaterial = material;
     field_21106_g = flag;
 }
开发者ID:riverar,项目名称:Crafty,代码行数:7,代码来源:EnumCreatureType.cs


示例4: validatePublicVoidNoArgMethods

 protected internal virtual void validatePublicVoidNoArgMethods(Class annotation, bool isStatic, List errors)
 {
   int num = isStatic ? 1 : 0;
   Iterator iterator = this.getTestClass().getAnnotatedMethods(annotation).iterator();
   while (iterator.hasNext())
     ((FrameworkMethod) iterator.next()).validatePublicVoidNoArg(num != 0, errors);
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:ParentRunner.cs


示例5: TestSuite

 public TestSuite(Class theClass)
 {
   base.\u002Ector();
   TestSuite testSuite = this;
   this.fTests = new Vector(10);
   this.addTestsFromTestCase(theClass);
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:TestSuite.cs


示例6: load

    public virtual void load(string resourceName, Class resourceSource)
    {
      InputStream relativeAsStream = ObjectUtilities.getResourceRelativeAsStream(resourceName, resourceSource);
      if (relativeAsStream != null)
      {
        // ISSUE: fault handler
        try
        {
          this.load(relativeAsStream);
        }
        __fault
        {
          try
          {
            relativeAsStream.close();
            goto label_5;
          }
          catch (IOException exception_1)
          {
          }
label_5:;
        }
        try
        {
          relativeAsStream.close();
        }
        catch (IOException ex)
        {
        }
      }
      else
        Log.debug((object) new StringBuffer().append("Configuration file not found in the classpath: ").append(resourceName).toString());
    }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:33,代码来源:PropertyFileConfiguration.cs


示例7: runnerForClass

 public override Runner runnerForClass(Class testClass)
 {
   RunnerBuilder[] runnerBuilderArray = new RunnerBuilder[5];
   int index1 = 0;
   IgnoredBuilder ignoredBuilder = this.ignoredBuilder();
   runnerBuilderArray[index1] = (RunnerBuilder) ignoredBuilder;
   int index2 = 1;
   AnnotatedBuilder annotatedBuilder = this.annotatedBuilder();
   runnerBuilderArray[index2] = (RunnerBuilder) annotatedBuilder;
   int index3 = 2;
   RunnerBuilder runnerBuilder = this.suiteMethodBuilder();
   runnerBuilderArray[index3] = runnerBuilder;
   int index4 = 3;
   JUnit3Builder junit3Builder = this.junit3Builder();
   runnerBuilderArray[index4] = (RunnerBuilder) junit3Builder;
   int index5 = 4;
   JUnit4Builder junit4Builder = this.junit4Builder();
   runnerBuilderArray[index5] = (RunnerBuilder) junit4Builder;
   Iterator iterator = Arrays.asList((object[]) runnerBuilderArray).iterator();
   while (iterator.hasNext())
   {
     Runner runner = ((RunnerBuilder) iterator.next()).safeRunnerForClass(testClass);
     if (runner != null)
       return runner;
   }
   return (Runner) null;
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:27,代码来源:AllDefaultPossibilitiesBuilder.cs


示例8: getClassLoader

 public static ClassLoader getClassLoader(Class c)
 {
   Class @class;
   Monitor.Enter((object) (@class = ObjectUtilities.class\u0024org\u0024jfree\u0024util\u0024ObjectUtilities != null ? ObjectUtilities.class\u0024org\u0024jfree\u0024util\u0024ObjectUtilities : (ObjectUtilities.class\u0024org\u0024jfree\u0024util\u0024ObjectUtilities = ObjectUtilities.class\u0024("org.jfree.util.ObjectUtilities"))));
   string str;
   // ISSUE: fault handler
   try
   {
     if (ObjectUtilities.classLoader != null)
     {
       ClassLoader classLoader = ObjectUtilities.classLoader;
       Monitor.Exit((object) @class);
       return classLoader;
     }
     else
     {
       str = ObjectUtilities.classLoaderSource;
       Monitor.Exit((object) @class);
     }
   }
   __fault
   {
     Monitor.Exit((object) @class);
   }
   if (String.instancehelper_equals("ThreadContext", (object) str))
   {
     ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
     if (contextClassLoader != null)
       return contextClassLoader;
   }
   return c.getClassLoader(ObjectUtilities.__\u003CGetCallerID\u003E()) ?? ClassLoader.getSystemClassLoader(ObjectUtilities.__\u003CGetCallerID\u003E());
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:32,代码来源:ObjectUtilities.cs


示例9: DynamicTimeSeriesCollection

 public DynamicTimeSeriesCollection(int nSeries, int nMoments, RegularTimePeriod timeSample, TimeZone zone)
 {
   DynamicTimeSeriesCollection seriesCollection = this;
   this.maximumItemCount = 2000;
   this.timePeriodClass = DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Minute"));
   this.minValue = new Float(0.0f);
   this.maxValue = (Float) null;
   this.maximumItemCount = nMoments;
   this.historyCount = nMoments;
   this.seriesKeys = new IComparable[nSeries];
   for (int index = 0; index < nSeries; ++index)
     this.seriesKeys[index] = (IComparable) "";
   this.newestAt = nMoments - 1;
   this.valueHistory = new DynamicTimeSeriesCollection.ValueSequence[nSeries];
   this.timePeriodClass = Object.instancehelper_getClass((object) timeSample);
   if (this.timePeriodClass == (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Second != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Second : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Second = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Second"))))
     this.pointsInTime = (RegularTimePeriod[]) new Second[nMoments];
   else if (this.timePeriodClass == (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Minute"))))
     this.pointsInTime = (RegularTimePeriod[]) new Minute[nMoments];
   else if (this.timePeriodClass == (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Hour != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Hour : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Hour = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Hour"))))
     this.pointsInTime = (RegularTimePeriod[]) new Hour[nMoments];
   this.workingCalendar = Calendar.getInstance(zone);
   this.position = 0;
   this.domainIsPointsInTime = true;
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:25,代码来源:DynamicTimeSeriesCollection.cs


示例10: ParameterSignature

 private ParameterSignature([In] Class obj0, [In] Annotation[] obj1)
 {
   base.\u002Ector();
   ParameterSignature parameterSignature = this;
   this.type = obj0;
   this.annotations = obj1;
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:ParameterSignature.cs


示例11: getRunner

 protected internal override Runner getRunner(RunnerBuilder builder, Class testClass)
 {
   Runner runner = base.getRunner(builder, testClass);
   if (this.fMethods)
     return ParallelComputer.parallelize(runner);
   else
     return runner;
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:ParallelComputer.cs


示例12: MobSpawnerHell

 public MobSpawnerHell()
 {
     biomeMonsters = (new Class[]
                      {
                          typeof (EntityGhast), typeof (EntityPigZombie)
                      });
     biomeCreatures = new Class[0];
 }
开发者ID:riverar,项目名称:Crafty,代码行数:8,代码来源:MobSpawnerHell.cs


示例13: getSuite

 public override Runner getSuite(RunnerBuilder builder, Class[] classes)
 {
   Runner suite = base.getSuite(builder, classes);
   if (this.fClasses)
     return ParallelComputer.parallelize(suite);
   else
     return suite;
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:ParallelComputer.cs


示例14: Unregister

 public static unsafe void Unregister(Class jvmProxy, JNIEnv env)
 {
     JNIResult res = env.UnregisterNatives(jvmProxy);
     if (res != JNIResult.JNI_OK)
     {
         throw new JNIException("Can't unbind native methods to class " + jvmProxy);
     }
 }
开发者ID:modulexcite,项目名称:Fork_Jni4Net,代码行数:8,代码来源:JNINativeMethod.cs


示例15: JUnit4TestAdapter

 public JUnit4TestAdapter(Class newTestClass, JUnit4TestAdapterCache cache)
 {
   base.\u002Ector();
   JUnit4TestAdapter junit4TestAdapter = this;
   this.fCache = cache;
   this.fNewTestClass = newTestClass;
   this.fRunner = Request.classWithoutSuiteMethod(newTestClass).getRunner();
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:JUnit4TestAdapter.cs


示例16: ParentRunner

 protected internal ParentRunner(Class testClass)
 {
   ParentRunner parentRunner = this;
   this.fFilter = (org.junit.runner.manipulation.Filter) null;
   this.fSorter = Sorter.NULL;
   this.fScheduler = (RunnerScheduler) new ParentRunner\u00241(this);
   this.fTestClass = new TestClass(testClass);
   this.validate();
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:9,代码来源:ParentRunner.cs


示例17: Parameterized

 public Parameterized(Class klass)
   : base(klass, Collections.emptyList())
 {
   Parameterized parameterized = this;
   this.runners = new ArrayList();
   List parametersList = this.getParametersList(this.getTestClass());
   for (int index = 0; index < parametersList.size(); ++index)
     this.runners.add((object) new Parameterized.TestClassRunnerForParameters(this, this.getTestClass().getJavaClass(), parametersList, index));
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:9,代码来源:Parameterized.cs


示例18: PrintableResult

 private PrintableResult([In] Class obj0)
 {
   Class[] classArray = new Class[1];
   int index = 0;
   Class @class = obj0;
   classArray[index] = @class;
   // ISSUE: explicit constructor call
   this.\u002Ector(JUnitCore.runClasses(classArray));
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:9,代码来源:PrintableResult.cs


示例19: getCache

        public virtual XWindow getCache(int id, Class cls)
        {
            SparseArray l2 = (SparseArray)sWindows.get(cls);
            if (l2 == null)
            {
                return null;
            }

            return (XWindow)l2.get(id);
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:10,代码来源:XWindowCache.cs


示例20: BlockSign

 public BlockSign(int i, Class class1, bool flag)
     : base(i, Material.wood)
 {
     isFreestanding = flag;
     blockIndexInTexture = 4;
     signEntityClass = class1;
     float f = 0.25F;
     float f1 = 1.0F;
     setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
 }
开发者ID:riverar,项目名称:Crafty,代码行数:10,代码来源:BlockSign.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# lang.String类代码示例发布时间:2022-05-26
下一篇:
C# jabber.JID类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap