本文整理汇总了Java中javax.lang.model.element.UnknownElementException类的典型用法代码示例。如果您正苦于以下问题:Java UnknownElementException类的具体用法?Java UnknownElementException怎么用?Java UnknownElementException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnknownElementException类属于javax.lang.model.element包,在下文中一共展示了UnknownElementException类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitUnknown
import javax.lang.model.element.UnknownElementException; //导入依赖的package包/类
@Override
public Void visitUnknown(Element e, Void p) {
show("unknown", e);
indent(+1);
try {
super.visitUnknown(e, p);
} catch (UnknownElementException ex) {
System.err.println("caught " + ex);
}
indent(-1);
return null;
}
示例2: visitUnknown
import javax.lang.model.element.UnknownElementException; //导入依赖的package包/类
/**
* Visits an unknown element. This method is called if
* this visitor is used in a version of the language later
* than 1.6, where new elements have been added. This
* implementation always throws a {@link UnknownElementException}
* but this is not required of subclasses.
*
* @param element the element to visit.
* @param parameter the additional parameter, specific to the visitor.
* @return the return value specific to the visitor.
* @throws UnknownElementException by default.
*/
public R visitUnknown(Element element, P parameter)
{
throw new UnknownElementException(element, parameter);
}