Here you can find the source of getXmlElementDecl(Method method)
Parameter | Description |
---|---|
method | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
public static XmlElementDecl getXmlElementDecl(Method method) throws Exception
//package com.java2s; // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell import java.lang.reflect.Method; import javax.xml.bind.annotation.XmlElementDecl; public class Main { /** Returns annotation XmlElementDecl of the given factory method * //from w w w .j a va2 s . c om * @param method * @return XmlElementDecl * @throws Exception */ public static XmlElementDecl getXmlElementDecl(Method method) throws Exception { XmlElementDecl ret = null; if (null == method) { throw new Exception("method is null"); } XmlElementDecl xmlElementDecl = (XmlElementDecl) method.getAnnotation(XmlElementDecl.class); if (null != xmlElementDecl) { ret = xmlElementDecl; } return ret; } }