KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > projector > util > ProcessorHelper


1 package org.apache.slide.projector.util;
2
3 import org.apache.slide.projector.Processor;
4 import org.apache.slide.projector.descriptor.ParameterDescriptor;
5
6 /**
7  * @version $Revision: 1.4 $
8  */

9
10 public class ProcessorHelper {
11     public static ParameterDescriptor getParameterDescriptor(Processor processor, String JavaDoc parameterName) {
12         ParameterDescriptor[] parameterDescriptors = processor.getParameterDescriptors();
13         for ( int i = 0; i < parameterDescriptors.length; i++ ) {
14             if ( parameterDescriptors[i].getName().equals(parameterName)) {
15                 return parameterDescriptors[i];
16             }
17         }
18         return null;
19     }
20 }
Popular Tags