<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FReflection%2FAnnotation</id>
		<title>Java/Reflection/Annotation - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FReflection%2FAnnotation"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Reflection/Annotation&amp;action=history"/>
		<updated>2026-04-18T04:50:32Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/Reflection/Annotation&amp;diff=6069&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Reflection/Annotation&amp;diff=6069&amp;oldid=prev"/>
				<updated>2010-06-01T06:01:41Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 06:01, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/Reflection/Annotation&amp;diff=6068&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Reflection/Annotation&amp;diff=6068&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:43Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== A better concise toString method for annotation types ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
import java.util.Map;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Collection;&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
import java.util.Set;&lt;br /&gt;
import java.util.HashSet;&lt;br /&gt;
import java.util.SortedSet;&lt;br /&gt;
import java.util.TreeSet;&lt;br /&gt;
import java.util.Queue;&lt;br /&gt;
import java.util.LinkedList;&lt;br /&gt;
import java.util.SortedMap;&lt;br /&gt;
import java.util.TreeMap;&lt;br /&gt;
import java.util.Arrays;&lt;br /&gt;
import java.util.concurrent.ConcurrentHashMap;&lt;br /&gt;
import java.lang.annotation.Annotation;&lt;br /&gt;
import java.lang.reflect.Method;&lt;br /&gt;
import java.lang.reflect.Field;&lt;br /&gt;
import java.lang.reflect.Modifier;&lt;br /&gt;
import java.lang.reflect.ParameterizedType;&lt;br /&gt;
import java.lang.reflect.Type;&lt;br /&gt;
import static java.lang.reflect.Modifier.isPublic;&lt;br /&gt;
import java.beans.PropertyDescriptor;&lt;br /&gt;
import java.beans.BeanInfo;&lt;br /&gt;
import java.beans.Introspector;&lt;br /&gt;
import java.beans.IntrospectionException;&lt;br /&gt;
/**&lt;br /&gt;
 * Common utilty methods that are useful when working with reflection.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Tim Fennell&lt;br /&gt;
 */&lt;br /&gt;
public class ReflectUtil {&lt;br /&gt;
    /** A cache of property descriptors by class and property name */&lt;br /&gt;
    private static Map&amp;lt;Class&amp;lt;?&amp;gt;, Map&amp;lt;String, PropertyDescriptor&amp;gt;&amp;gt; propertyDescriptors =&lt;br /&gt;
            new ConcurrentHashMap&amp;lt;Class&amp;lt;?&amp;gt;, Map&amp;lt;String, PropertyDescriptor&amp;gt;&amp;gt;();&lt;br /&gt;
    /** Static helper class, shouldn&amp;quot;t be constructed. */&lt;br /&gt;
    private ReflectUtil() {}&lt;br /&gt;
    /**&lt;br /&gt;
     * Holds a map of commonly used interface types (mostly collections) to a class that&lt;br /&gt;
     * implements the interface and will, by default, be instantiated when an instance&lt;br /&gt;
     * of the interface is needed.&lt;br /&gt;
     */&lt;br /&gt;
    protected static final Map&amp;lt;Class&amp;lt;?&amp;gt;,Class&amp;lt;?&amp;gt;&amp;gt; interfaceImplementations = new HashMap&amp;lt;Class&amp;lt;?&amp;gt;,Class&amp;lt;?&amp;gt;&amp;gt;();&lt;br /&gt;
    /**&lt;br /&gt;
     * Holds a map of primitive type to the default value for that primitive type.  Isn&amp;quot;t it&lt;br /&gt;
     * odd that there&amp;quot;s no way to get this programmatically from the Class objects?&lt;br /&gt;
     */&lt;br /&gt;
    protected static final Map&amp;lt;Class&amp;lt;?&amp;gt;,Object&amp;gt; primitiveDefaults = new HashMap&amp;lt;Class&amp;lt;?&amp;gt;,Object&amp;gt;();&lt;br /&gt;
    static {&lt;br /&gt;
        interfaceImplementations.put(Collection.class, ArrayList.class);&lt;br /&gt;
        interfaceImplementations.put(List.class,       ArrayList.class);&lt;br /&gt;
        interfaceImplementations.put(Set.class,        HashSet.class);&lt;br /&gt;
        interfaceImplementations.put(SortedSet.class,  TreeSet.class);&lt;br /&gt;
        interfaceImplementations.put(Queue.class,      LinkedList.class);&lt;br /&gt;
        interfaceImplementations.put(Map.class,        HashMap.class);&lt;br /&gt;
        interfaceImplementations.put(SortedMap.class,  TreeMap.class);&lt;br /&gt;
        primitiveDefaults.put(Boolean.TYPE,    false);&lt;br /&gt;
        primitiveDefaults.put(Character.TYPE, &amp;quot;\0&amp;quot;);&lt;br /&gt;
        primitiveDefaults.put(Byte.TYPE,       new Byte(&amp;quot;0&amp;quot;));&lt;br /&gt;
        primitiveDefaults.put(Short.TYPE,      new Short(&amp;quot;0&amp;quot;));&lt;br /&gt;
        primitiveDefaults.put(Integer.TYPE,    new Integer(0));&lt;br /&gt;
        primitiveDefaults.put(Long.TYPE,       new Long(0l));&lt;br /&gt;
        primitiveDefaults.put(Float.TYPE,      new Float(0f));&lt;br /&gt;
        primitiveDefaults.put(Double.TYPE,     new Double(0.0));&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * The set of method that annotation classes inherit, and should be avoided when&lt;br /&gt;
     * toString()ing an annotation class.&lt;br /&gt;
     */&lt;br /&gt;
    private static final Set&amp;lt;String&amp;gt; INHERITED_ANNOTATION_METHODS =&lt;br /&gt;
            new HashSet(Arrays.asList(&amp;quot;toString&amp;quot;, &amp;quot;equals&amp;quot;, &amp;quot;hashCode&amp;quot;, &amp;quot;annotationType&amp;quot;));&lt;br /&gt;
    /**&lt;br /&gt;
     * Looks up the default implementing type for the supplied interface. This is done&lt;br /&gt;
     * based on a static map of known common interface types and implementing classes.&lt;br /&gt;
     *&lt;br /&gt;
     * @param iface an interface for which an implementing class is needed&lt;br /&gt;
     * @return a Class object representing the implementing type, or null if one is&lt;br /&gt;
     *         not found&lt;br /&gt;
     */&lt;br /&gt;
    public static Class&amp;lt;?&amp;gt; getImplementingClass(Class&amp;lt;?&amp;gt; iface) {&lt;br /&gt;
        return interfaceImplementations.get(iface);&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * Attempts to determine an implementing class for the interface provided and instantiate&lt;br /&gt;
     * it using a default constructor.&lt;br /&gt;
     *&lt;br /&gt;
     * @param interfaceType an interface (or abstract class) to make an instance of&lt;br /&gt;
     * @return an instance of the interface type supplied&lt;br /&gt;
     * @throws InstantiationException if no implementation type has been configured&lt;br /&gt;
     * @throws IllegalAccessException if thrown by the JVM during class instantiation&lt;br /&gt;
     */&lt;br /&gt;
    @SuppressWarnings(&amp;quot;unchecked&amp;quot;)&lt;br /&gt;
  public static &amp;lt;T&amp;gt; T getInterfaceInstance(Class&amp;lt;T&amp;gt; interfaceType)&lt;br /&gt;
            throws InstantiationException, IllegalAccessException {&lt;br /&gt;
        Class impl = getImplementingClass(interfaceType);&lt;br /&gt;
        if (impl == null) {&lt;br /&gt;
            throw new InstantiationException(&lt;br /&gt;
                    &amp;quot;Stripes needed to instantiate a property who&amp;quot;s declared type as an &amp;quot; +&lt;br /&gt;
                    &amp;quot;interface (which obviously cannot be instantiated. The interface is not &amp;quot; +&lt;br /&gt;
                    &amp;quot;one that Stripes is aware of, so no implementing class was known. The &amp;quot; +&lt;br /&gt;
                    &amp;quot;interface type was: &amp;quot;&amp;quot; + interfaceType.getName() + &amp;quot;&amp;quot;. To fix this &amp;quot; +&lt;br /&gt;
                    &amp;quot;you&amp;quot;ll need to do one of three things. 1) Change the getter/setter methods &amp;quot; +&lt;br /&gt;
                    &amp;quot;to use a concrete type so that Stripes can instantiate it. 2) in the bean&amp;quot;s &amp;quot; +&lt;br /&gt;
                    &amp;quot;setContext() method pre-instantiate the property so Stripes doesn&amp;quot;t have to. &amp;quot; +&lt;br /&gt;
                    &amp;quot;3) Bug the Stripes author ;)  If the interface is a JDK type it can easily be &amp;quot; +&lt;br /&gt;
                    &amp;quot;fixed. If not, if enough people ask, a generic way to handle the problem &amp;quot; +&lt;br /&gt;
                    &amp;quot;might get implemented.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else {&lt;br /&gt;
            return (T) impl.newInstance();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * Utility method used to load a class.  Any time that Stripes needs to load of find a&lt;br /&gt;
     * class by name it uses this method.  As a result any time the classloading strategy&lt;br /&gt;
     * needs to change it can be done in one place!  Currently uses&lt;br /&gt;
     * {@code Thread.currentThread().getContextClassLoader().loadClass(String)}.&lt;br /&gt;
     *&lt;br /&gt;
     * @param name the fully qualified (binary) name of the class to find or load&lt;br /&gt;
     * @return the Class object representing the class&lt;br /&gt;
     * @throws ClassNotFoundException if the class cannot be loaded&lt;br /&gt;
     */&lt;br /&gt;
    @SuppressWarnings(&amp;quot;unchecked&amp;quot;) // this allows us to assign without casting&lt;br /&gt;
  public static Class findClass(String name) throws ClassNotFoundException {&lt;br /&gt;
        return Thread.currentThread().getContextClassLoader().loadClass(name);&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * &amp;lt;p&amp;gt;A better (more concise) toString method for annotation types that yields a String&lt;br /&gt;
     * that should look more like the actual usage of the annotation in a class. The String produced&lt;br /&gt;
     * is similar to that produced by calling toString() on the annotation directly, with the&lt;br /&gt;
     * following differences:&amp;lt;/p&amp;gt;&lt;br /&gt;
     *&lt;br /&gt;
     * &amp;lt;ul&amp;gt;&lt;br /&gt;
     *   &amp;lt;li&amp;gt;Uses the classes simple name instead of it&amp;quot;s fully qualified name.&amp;lt;/li&amp;gt;&lt;br /&gt;
     *   &amp;lt;li&amp;gt;Only outputs attributes that are set to non-default values.&amp;lt;/li&amp;gt;&lt;br /&gt;
     *&lt;br /&gt;
     * &amp;lt;p&amp;gt;If, for some unforseen reason, an exception is thrown within this method it will be&lt;br /&gt;
     * caught and the return value will be {@code ann.toString()}.&lt;br /&gt;
     *&lt;br /&gt;
     * @param ann the annotation to convert to a human readable String&lt;br /&gt;
     * @return a human readable String form of the annotation and it&amp;quot;s attributes&lt;br /&gt;
     */&lt;br /&gt;
    public static String toString(Annotation ann) {&lt;br /&gt;
        try {&lt;br /&gt;
            Class&amp;lt;? extends Annotation&amp;gt; type = ann.annotationType();&lt;br /&gt;
            StringBuilder builder = new StringBuilder(128);&lt;br /&gt;
            builder.append(&amp;quot;@&amp;quot;);&lt;br /&gt;
            builder.append(type.getSimpleName());&lt;br /&gt;
            boolean appendedAnyParameters = false;&lt;br /&gt;
            Method[] methods = type.getMethods();&lt;br /&gt;
            for (Method method : methods) {&lt;br /&gt;
                if (!INHERITED_ANNOTATION_METHODS.contains(method.getName())) {&lt;br /&gt;
                    Object defaultValue = method.getDefaultValue();&lt;br /&gt;
                    Object actualValue  = method.invoke(ann);&lt;br /&gt;
                    // If we have arrays, they have to be treated a little differently&lt;br /&gt;
                    Object[] defaultArray = null, actualArray = null;&lt;br /&gt;
                    if ( Object[].class.isAssignableFrom(method.getReturnType()) ) {&lt;br /&gt;
                        defaultArray = (Object[]) defaultValue;&lt;br /&gt;
                        actualArray  = (Object[]) actualValue;&lt;br /&gt;
                    }&lt;br /&gt;
                    // Only print an attribute if it isn&amp;quot;t set to the default value&lt;br /&gt;
                    if ( (defaultArray != null &amp;amp;&amp;amp; !Arrays.equals(defaultArray, actualArray)) ||&lt;br /&gt;
                            (defaultArray == null &amp;amp;&amp;amp; !actualValue.equals(defaultValue)) ) {&lt;br /&gt;
                        if (appendedAnyParameters) {&lt;br /&gt;
                            builder.append(&amp;quot;, &amp;quot;);&lt;br /&gt;
                        }&lt;br /&gt;
                        else {&lt;br /&gt;
                            builder.append(&amp;quot;(&amp;quot;);&lt;br /&gt;
                        }&lt;br /&gt;
                        builder.append(method.getName());&lt;br /&gt;
                        builder.append(&amp;quot;=&amp;quot;);&lt;br /&gt;
                        if (actualArray != null) {&lt;br /&gt;
                            builder.append( Arrays.toString(actualArray) );&lt;br /&gt;
                        }&lt;br /&gt;
                        else {&lt;br /&gt;
                            builder.append(actualValue);&lt;br /&gt;
                        }&lt;br /&gt;
                        appendedAnyParameters = true;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            if (appendedAnyParameters) {&lt;br /&gt;
                builder.append(&amp;quot;)&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            return builder.toString();&lt;br /&gt;
        }&lt;br /&gt;
        catch (Exception e) {&lt;br /&gt;
            return ann.toString();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * Fetches all methods of all access types from the supplied class and super&lt;br /&gt;
     * classes. Methods that have been overridden in the inheritance hierarchy are&lt;br /&gt;
     * only returned once, using the instance lowest down the hierarchy.&lt;br /&gt;
     *&lt;br /&gt;
     * @param clazz the class to inspect&lt;br /&gt;
     * @return a collection of methods&lt;br /&gt;
     */&lt;br /&gt;
    public static Collection&amp;lt;Method&amp;gt; getMethods(Class&amp;lt;?&amp;gt; clazz) {&lt;br /&gt;
        Collection&amp;lt;Method&amp;gt; found = new ArrayList&amp;lt;Method&amp;gt;();&lt;br /&gt;
        while (clazz != null) {&lt;br /&gt;
            for (Method m1 : clazz.getDeclaredMethods()) {&lt;br /&gt;
                boolean overridden = false;&lt;br /&gt;
                for (Method m2 : found) {&lt;br /&gt;
                    if ( m2.getName().equals(m1.getName()) &amp;amp;&amp;amp;&lt;br /&gt;
                            Arrays.deepEquals(m1.getParameterTypes(), m2.getParameterTypes())) {&lt;br /&gt;
                        overridden = true;&lt;br /&gt;
                        break;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                if (!overridden) found.add(m1);&lt;br /&gt;
            }&lt;br /&gt;
            clazz = clazz.getSuperclass();&lt;br /&gt;
        }&lt;br /&gt;
        return found;&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * Fetches all fields of all access types from the supplied class and super&lt;br /&gt;
     * classes. Fieldss that have been overridden in the inheritance hierarchy are&lt;br /&gt;
     * only returned once, using the instance lowest down the hierarchy.&lt;br /&gt;
     *&lt;br /&gt;
     * @param clazz the class to inspect&lt;br /&gt;
     * @return a collection of fields&lt;br /&gt;
     */&lt;br /&gt;
    public static Collection&amp;lt;Field&amp;gt; getFields(Class&amp;lt;?&amp;gt; clazz) {&lt;br /&gt;
        Map&amp;lt;String,Field&amp;gt; fields = new HashMap&amp;lt;String, Field&amp;gt;();&lt;br /&gt;
        while (clazz != null) {&lt;br /&gt;
            for (Field field : clazz.getDeclaredFields()) {&lt;br /&gt;
                if ( !fields.containsKey(field.getName()) ) {&lt;br /&gt;
                    fields.put(field.getName(), field);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            clazz = clazz.getSuperclass();&lt;br /&gt;
        }&lt;br /&gt;
        return fields.values();&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * Fetches the property descriptor for the named property of the supplied class. To&lt;br /&gt;
     * speed things up a cache is maintained of propertyName to PropertyDescriptor for&lt;br /&gt;
     * each class used with this method.  If there is no property with the specified name,&lt;br /&gt;
     * returns null.&lt;br /&gt;
     *&lt;br /&gt;
     * @param clazz the class who&amp;quot;s properties to examine&lt;br /&gt;
     * @param property the String name of the property to look for&lt;br /&gt;
     * @return the PropertyDescriptor or null if none is found with a matching name&lt;br /&gt;
     */&lt;br /&gt;
    public static PropertyDescriptor getPropertyDescriptor(Class&amp;lt;?&amp;gt; clazz, String property) {&lt;br /&gt;
        Map&amp;lt;String,PropertyDescriptor&amp;gt; pds = propertyDescriptors.get(clazz);&lt;br /&gt;
        if (pds == null) {&lt;br /&gt;
            try {&lt;br /&gt;
                BeanInfo info = Introspector.getBeanInfo(clazz);&lt;br /&gt;
                PropertyDescriptor[] descriptors = info.getPropertyDescriptors();&lt;br /&gt;
                pds = new HashMap&amp;lt;String, PropertyDescriptor&amp;gt;();&lt;br /&gt;
                for (PropertyDescriptor descriptor : descriptors) {&lt;br /&gt;
                    pds.put(descriptor.getName(), descriptor);&lt;br /&gt;
                }&lt;br /&gt;
                propertyDescriptors.put(clazz, pds);&lt;br /&gt;
            }&lt;br /&gt;
            catch (IntrospectionException ie) {&lt;br /&gt;
                throw new RuntimeException(&amp;quot;Could not examine class &amp;quot;&amp;quot; + clazz.getName() +&lt;br /&gt;
                        &amp;quot;&amp;quot; using Introspector.getBeanInfo() to determine property information.&amp;quot;, ie);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return pds.get(property);&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * &amp;lt;p&amp;gt;Attempts to find an accessible version of the method passed in, where accessible&lt;br /&gt;
     * is defined as the method itself being public and the declaring class being public.&lt;br /&gt;
     * Mostly useful as a workaround to the situation when&lt;br /&gt;
     * {@link PropertyDescriptor#getReadMethod()} and/or&lt;br /&gt;
     * {@link java.beans.PropertyDescriptor#getWriteMethod()} returns methods that are not&lt;br /&gt;
     * accessible (usually due to public implementations of interface methods in private&lt;br /&gt;
     * classes).&amp;lt;/p&amp;gt;&lt;br /&gt;
     *&lt;br /&gt;
     * &amp;lt;p&amp;gt;Checks the method passed in and if it already meets these criteria it is returned&lt;br /&gt;
     * immediately. In general this leads to very little performance overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
     *&lt;br /&gt;
     * &amp;lt;p&amp;gt;If the method does not meet the criteria then the class&amp;quot; interfaces are scanned&lt;br /&gt;
     * for a matching method. If one is not found, then the class&amp;quot; superclass hierarchy&lt;br /&gt;
     * is searched. Finally, if no matching method can be found the original method is&lt;br /&gt;
     * returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
     *&lt;br /&gt;
     * @param m a method that may or may not be accessible&lt;br /&gt;
     * @return either an accessible version of the same method, or the method passed in if&lt;br /&gt;
     *         an accessible version cannot be found&lt;br /&gt;
     */&lt;br /&gt;
    public static Method findAccessibleMethod(final Method m) {&lt;br /&gt;
        // If the passed in method is accessible, then just give it back.&lt;br /&gt;
        if (isPublic(m.getModifiers()) &amp;amp;&amp;amp; isPublic(m.getDeclaringClass().getModifiers())) return m;&lt;br /&gt;
        if (m.isAccessible()) return m;&lt;br /&gt;
        final Class&amp;lt;?&amp;gt; clazz    = m.getDeclaringClass();&lt;br /&gt;
        final String name    = m.getName();&lt;br /&gt;
        final Class&amp;lt;?&amp;gt;[] ptypes = m.getParameterTypes();&lt;br /&gt;
        // Else, loop through the interfaces for the declaring class, looking for a&lt;br /&gt;
        // public version of the method that we can call&lt;br /&gt;
        for (Class&amp;lt;?&amp;gt; iface : clazz.getInterfaces()) {&lt;br /&gt;
            try {&lt;br /&gt;
                Method m2 = iface.getMethod(name, ptypes);&lt;br /&gt;
                if (m2.isAccessible()) return m2;&lt;br /&gt;
                if (isPublic(iface.getModifiers()) &amp;amp;&amp;amp; isPublic(m2.getModifiers())) return m2;&lt;br /&gt;
            }&lt;br /&gt;
            catch (NoSuchMethodException nsme) { /* Not Unexpected. */ }&lt;br /&gt;
        }&lt;br /&gt;
        // Else loop through the superclasses looking for a public method&lt;br /&gt;
        Class&amp;lt;?&amp;gt; c = clazz.getSuperclass();&lt;br /&gt;
        while (c != null) {&lt;br /&gt;
            try {&lt;br /&gt;
                Method m2 = c.getMethod(name, ptypes);&lt;br /&gt;
                if (m2.isAccessible()) return m2;&lt;br /&gt;
                if (isPublic(c.getModifiers()) &amp;amp;&amp;amp; isPublic(m2.getModifiers())) return m2;&lt;br /&gt;
            }&lt;br /&gt;
            catch (NoSuchMethodException nsme) { /* Not Unexpected. */ }&lt;br /&gt;
            c = c.getSuperclass();&lt;br /&gt;
        }&lt;br /&gt;
        // If we haven&amp;quot;t found anything at this point, just give up!&lt;br /&gt;
        return m;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Looks for an instance (i.e. non-static) public field with the matching name and&lt;br /&gt;
     * returns it if one exists.  If no such field exists, returns null.&lt;br /&gt;
     *&lt;br /&gt;
     * @param clazz the clazz who&amp;quot;s fields to examine&lt;br /&gt;
     * @param property the name of the property/field to look for&lt;br /&gt;
     * @return the Field object or null if no matching field exists&lt;br /&gt;
     */&lt;br /&gt;
    public static Field getField(Class&amp;lt;?&amp;gt; clazz, String property) {&lt;br /&gt;
        try {&lt;br /&gt;
            Field field = clazz.getField(property);&lt;br /&gt;
            return !Modifier.isStatic(field.getModifiers()) ? field : null;&lt;br /&gt;
        }&lt;br /&gt;
        catch (NoSuchFieldException nsfe) {&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * Returns an appropriate default value for the class supplied. Mirrors the defaults used&lt;br /&gt;
     * when the JVM initializes instance variables.&lt;br /&gt;
     *&lt;br /&gt;
     * @param clazz the class for which to find the default value&lt;br /&gt;
     * @return null for non-primitive types and an appropriate wrapper instance for primitives&lt;br /&gt;
     */&lt;br /&gt;
    public static Object getDefaultValue(Class&amp;lt;?&amp;gt; clazz) {&lt;br /&gt;
        if (clazz.isPrimitive()) {&lt;br /&gt;
            return primitiveDefaults.get(clazz);&lt;br /&gt;
        }&lt;br /&gt;
        else {&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Returns a set of all interfaces implemented by class supplied. This includes all&lt;br /&gt;
     * interfaces directly implemented by this class as well as those implemented by&lt;br /&gt;
     * superclasses or interface superclasses.&lt;br /&gt;
     * &lt;br /&gt;
     * @param clazz&lt;br /&gt;
     * @return all interfaces implemented by this class&lt;br /&gt;
     */&lt;br /&gt;
    public static Set&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt; getImplementedInterfaces(Class&amp;lt;?&amp;gt; clazz)&lt;br /&gt;
    {&lt;br /&gt;
        Set&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt; interfaces = new HashSet&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt;();&lt;br /&gt;
        &lt;br /&gt;
        if (clazz.isInterface())&lt;br /&gt;
            interfaces.add(clazz);&lt;br /&gt;
        while (clazz != null) {&lt;br /&gt;
            for (Class&amp;lt;?&amp;gt; iface : clazz.getInterfaces())&lt;br /&gt;
                interfaces.addAll(getImplementedInterfaces(iface));&lt;br /&gt;
            clazz = clazz.getSuperclass();&lt;br /&gt;
        } &lt;br /&gt;
        return interfaces;&lt;br /&gt;
    }&lt;br /&gt;
    /**&lt;br /&gt;
     * Returns an array of Type objects representing the actual type arguments&lt;br /&gt;
     * to targetType used by clazz.&lt;br /&gt;
     * &lt;br /&gt;
     * @param clazz the implementing class (or subclass)&lt;br /&gt;
     * @param targetType the implemented generic class or interface&lt;br /&gt;
     * @return an array of Type objects or null&lt;br /&gt;
     */&lt;br /&gt;
    public static Type[] getActualTypeArguments(Class&amp;lt;?&amp;gt; clazz, Class&amp;lt;?&amp;gt; targetType) {&lt;br /&gt;
        Set&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt; classes = new HashSet&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt;();&lt;br /&gt;
        classes.add(clazz);&lt;br /&gt;
        if (targetType.isInterface())&lt;br /&gt;
            classes.addAll(getImplementedInterfaces(clazz));&lt;br /&gt;
        Class&amp;lt;?&amp;gt; superClass = clazz.getSuperclass();&lt;br /&gt;
        while (superClass != null) {&lt;br /&gt;
            classes.add(superClass);&lt;br /&gt;
            superClass = superClass.getSuperclass();&lt;br /&gt;
        }&lt;br /&gt;
        for (Class&amp;lt;?&amp;gt; search : classes) {&lt;br /&gt;
            for (Type type : (targetType.isInterface() ? search.getGenericInterfaces()&lt;br /&gt;
                    : new Type[] { search.getGenericSuperclass() })) {&lt;br /&gt;
                if (type instanceof ParameterizedType) {&lt;br /&gt;
                    ParameterizedType parameterizedType = (ParameterizedType) type;&lt;br /&gt;
                    if (targetType.equals(parameterizedType.getRawType()))&lt;br /&gt;
                        return parameterizedType.getActualTypeArguments();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return null;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== default values in an annotation. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
import java.lang.annotation.Retention;&lt;br /&gt;
import java.lang.annotation.RetentionPolicy;&lt;br /&gt;
import java.lang.reflect.Method;&lt;br /&gt;
@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;
@interface MyAnno {&lt;br /&gt;
  String str() default &amp;quot;Testing&amp;quot;;&lt;br /&gt;
  int val() default 9000;&lt;br /&gt;
}&lt;br /&gt;
class Meta3 {&lt;br /&gt;
  @MyAnno()&lt;br /&gt;
  public static void myMeth() {&lt;br /&gt;
    Meta3 ob = new Meta3();&lt;br /&gt;
    try {&lt;br /&gt;
      Class c = ob.getClass();&lt;br /&gt;
      Method m = c.getMethod(&amp;quot;myMeth&amp;quot;);&lt;br /&gt;
      MyAnno anno = m.getAnnotation(MyAnno.class);&lt;br /&gt;
      System.out.println(anno.str() + &amp;quot; &amp;quot; + anno.val());&lt;br /&gt;
    } catch (NoSuchMethodException exc) {&lt;br /&gt;
      System.out.println(&amp;quot;Method Not Found.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    myMeth();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Does a method have an annotation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
import java.lang.annotation.Retention;&lt;br /&gt;
import java.lang.annotation.RetentionPolicy;&lt;br /&gt;
import java.lang.reflect.Method;&lt;br /&gt;
@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;
@interface MyMarker {&lt;br /&gt;
}&lt;br /&gt;
class Marker {&lt;br /&gt;
  @MyMarker&lt;br /&gt;
  public static void myMeth() {&lt;br /&gt;
    Marker ob = new Marker();&lt;br /&gt;
    try {&lt;br /&gt;
      Method m = ob.getClass().getMethod(&amp;quot;myMeth&amp;quot;);&lt;br /&gt;
      if (m.isAnnotationPresent(MyMarker.class))&lt;br /&gt;
        System.out.println(&amp;quot;MyMarker is present.&amp;quot;);&lt;br /&gt;
    } catch (NoSuchMethodException exc) {&lt;br /&gt;
      System.out.println(&amp;quot;Method Not Found.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    myMeth();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Get annotation by annotation class ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
import java.lang.annotation.Retention; &lt;br /&gt;
import java.lang.annotation.RetentionPolicy;&lt;br /&gt;
import java.lang.reflect.Method;&lt;br /&gt;
@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;
@interface MyAnno {&lt;br /&gt;
  String str();&lt;br /&gt;
  int val();&lt;br /&gt;
}&lt;br /&gt;
class Meta {&lt;br /&gt;
  @MyAnno(str = &amp;quot;Two Parameters&amp;quot;, val = 19)&lt;br /&gt;
  public static void myMeth(String str, int i) {&lt;br /&gt;
    Meta ob = new Meta();&lt;br /&gt;
    try {&lt;br /&gt;
      Class c = ob.getClass();&lt;br /&gt;
      Method m = c.getMethod(&amp;quot;myMeth&amp;quot;, String.class, int.class);&lt;br /&gt;
      MyAnno anno = m.getAnnotation(MyAnno.class);&lt;br /&gt;
      System.out.println(anno.str() + &amp;quot; &amp;quot; + anno.val());&lt;br /&gt;
    } catch (NoSuchMethodException exc) {&lt;br /&gt;
      System.out.println(&amp;quot;Method Not Found.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    myMeth(&amp;quot;test&amp;quot;, 10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Get Annotation Parameter ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
// $Id: ReflectionHelper.java 16271 2009-04-07 20:20:12Z hardy.ferentschik $&lt;br /&gt;
/*&lt;br /&gt;
* JBoss, Home of Professional Open Source&lt;br /&gt;
* Copyright 2008, Red Hat Middleware LLC, and individual contributors&lt;br /&gt;
* by the @authors tag. See the copyright.txt in the distribution for a&lt;br /&gt;
* full listing of individual contributors.&lt;br /&gt;
*&lt;br /&gt;
* Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);&lt;br /&gt;
* you may not use this file except in compliance with the License.&lt;br /&gt;
* You may obtain a copy of the License at&lt;br /&gt;
* http://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
* Unless required by applicable law or agreed to in writing, software&lt;br /&gt;
* distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; BASIS,  &lt;br /&gt;
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&lt;br /&gt;
* See the License for the specific language governing permissions and&lt;br /&gt;
* limitations under the License.&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
import java.beans.Introspector;&lt;br /&gt;
import java.lang.annotation.Annotation;&lt;br /&gt;
import java.lang.reflect.AccessibleObject;&lt;br /&gt;
import java.lang.reflect.Field;&lt;br /&gt;
import java.lang.reflect.InvocationTargetException;&lt;br /&gt;
import java.lang.reflect.Member;&lt;br /&gt;
import java.lang.reflect.Method;&lt;br /&gt;
import java.lang.reflect.Modifier;&lt;br /&gt;
import java.lang.reflect.ParameterizedType;&lt;br /&gt;
import java.lang.reflect.Type;&lt;br /&gt;
import java.lang.reflect.WildcardType;&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.Arrays;&lt;br /&gt;
import java.util.Iterator;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Some reflection utility methods.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Hardy Ferentschik&lt;br /&gt;
 */&lt;br /&gt;
public class ReflectionHelper {&lt;br /&gt;
&lt;br /&gt;
  @SuppressWarnings(&amp;quot;unchecked&amp;quot;)&lt;br /&gt;
  public static &amp;lt;T&amp;gt; T getAnnotationParameter(Annotation annotation, String parameterName, Class&amp;lt;T&amp;gt; type) {&lt;br /&gt;
    try {&lt;br /&gt;
      Method m = annotation.getClass().getMethod( parameterName );&lt;br /&gt;
      Object o = m.invoke( annotation );&lt;br /&gt;
      if ( o.getClass().getName().equals( type.getName() ) ) {&lt;br /&gt;
        return ( T ) o;&lt;br /&gt;
      }&lt;br /&gt;
      else {&lt;br /&gt;
        String msg = &amp;quot;Wrong parameter type. Expected: &amp;quot; + type.getName() + &amp;quot; Actual: &amp;quot; + o.getClass().getName();&lt;br /&gt;
        throw new RuntimeException( msg );&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    catch ( NoSuchMethodException e ) {&lt;br /&gt;
      String msg = &amp;quot;The specified annotation defines no parameter &amp;quot;&amp;quot; + parameterName + &amp;quot;&amp;quot;.&amp;quot;;&lt;br /&gt;
      throw new RuntimeException( msg, e );&lt;br /&gt;
    }&lt;br /&gt;
    catch ( IllegalAccessException e ) {&lt;br /&gt;
      String msg = &amp;quot;Unable to get &amp;quot;&amp;quot; + parameterName + &amp;quot;&amp;quot; from &amp;quot; + annotation.getClass().getName();&lt;br /&gt;
      throw new RuntimeException( msg, e );&lt;br /&gt;
    }&lt;br /&gt;
    catch ( InvocationTargetException e ) {&lt;br /&gt;
      String msg = &amp;quot;Unable to get &amp;quot;&amp;quot; + parameterName + &amp;quot;&amp;quot; from &amp;quot; + annotation.getClass().getName();&lt;br /&gt;
      throw new RuntimeException( msg, e );&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Show all annotations for a class and a method. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
import java.lang.annotation.Annotation;&lt;br /&gt;
import java.lang.annotation.Retention;&lt;br /&gt;
import java.lang.annotation.RetentionPolicy;&lt;br /&gt;
import java.lang.reflect.Method;&lt;br /&gt;
@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;
@interface MyAnno {&lt;br /&gt;
  String str();&lt;br /&gt;
  int val();&lt;br /&gt;
}&lt;br /&gt;
@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;
@interface What {&lt;br /&gt;
  String description();&lt;br /&gt;
}&lt;br /&gt;
@What(description = &amp;quot;An annotation test class&amp;quot;)&lt;br /&gt;
@MyAnno(str = &amp;quot;Meta2&amp;quot;, val = 99)&lt;br /&gt;
class Meta2 {&lt;br /&gt;
  @What(description = &amp;quot;An annotation test method&amp;quot;)&lt;br /&gt;
  @MyAnno(str = &amp;quot;Testing&amp;quot;, val = 100)&lt;br /&gt;
  public static void myMeth() {&lt;br /&gt;
    Meta2 ob = new Meta2();&lt;br /&gt;
    try {&lt;br /&gt;
      Annotation annos[] = ob.getClass().getAnnotations();&lt;br /&gt;
      System.out.println(&amp;quot;All annotations for Meta2:&amp;quot;);&lt;br /&gt;
      for (Annotation a : annos)&lt;br /&gt;
        System.out.println(a);&lt;br /&gt;
      Method m = ob.getClass().getMethod(&amp;quot;myMeth&amp;quot;);&lt;br /&gt;
      annos = m.getAnnotations();&lt;br /&gt;
      System.out.println(&amp;quot;All annotations for myMeth:&amp;quot;);&lt;br /&gt;
      for (Annotation a : annos)&lt;br /&gt;
        System.out.println(a);&lt;br /&gt;
    } catch (NoSuchMethodException exc) {&lt;br /&gt;
      System.out.println(&amp;quot;Method Not Found.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    myMeth();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Uses reflection to display the annotation associated with a method. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
import java.lang.annotation.Retention;&lt;br /&gt;
import java.lang.annotation.RetentionPolicy;&lt;br /&gt;
import java.lang.reflect.Method;&lt;br /&gt;
@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;
@interface MyAnno {&lt;br /&gt;
  String str();&lt;br /&gt;
  int val();&lt;br /&gt;
}&lt;br /&gt;
class Meta {&lt;br /&gt;
  @MyAnno(str = &amp;quot;Annotation Example&amp;quot;, val = 100)&lt;br /&gt;
  public static void myMeth() {&lt;br /&gt;
    Meta ob = new Meta();&lt;br /&gt;
    try {&lt;br /&gt;
      Class c = ob.getClass();&lt;br /&gt;
      Method m = c.getMethod(&amp;quot;myMeth&amp;quot;);&lt;br /&gt;
      MyAnno anno = m.getAnnotation(MyAnno.class);&lt;br /&gt;
      System.out.println(anno.str() + &amp;quot; &amp;quot; + anno.val());&lt;br /&gt;
    } catch (NoSuchMethodException exc) {&lt;br /&gt;
      System.out.println(&amp;quot;Method Not Found.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    myMeth();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>