當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。