private void loadGroovyTargetFile(java.io.File file)
 {
     java.lang.Class clazz;
     try
     {
         clazz = _groovyClassManager.parseClass(file);
     }
     catch (java.lang.reflect.InvocationTargetException e)
     {
         throw new BuildException("File " + file.getAbsolutePath() + " did not compile correctly.", e);
     }
     loadGroovyTargetsFromClass(clazz);
     loadGroovyTasksFromClass(clazz, file);
 }
        private void loadGroovyTasksFromClass(java.lang.Class clazz, java.io.File file)
        {
            java.lang.reflect.Method[] methods = GroovyUtil.getMethodsAnnotatedWith(clazz, "com.agilex.ci.cifactory.nant.task");

            foreach (java.lang.reflect.Method method in methods)
            {
                string[]          args    = GroovyUtil.extractTaskArgumentNames(method.getName(), new StreamReader(file.getAbsolutePath()).ReadToEnd());
                GroovyTaskBuilder builder = new GroovyTaskBuilder(method.getName(), clazz, method, args);
                TypeFactory.TaskBuilders.Add(builder);
            }
        }
Beispiel #3
0
 /// <summary>Create a new typeface from the specified font file.</summary>
 /// <remarks>Create a new typeface from the specified font file.</remarks>
 /// <param name="path">The path to the font data.</param>
 /// <returns>The new typeface.</returns>
 public static android.graphics.Typeface createFromFile(java.io.File path)
 {
     return(new android.graphics.Typeface(nativeCreateFromFile(path.getAbsolutePath())
                                          ));
 }