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


C# lang.Class类代码示例

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


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


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