/** * The current annotation processor environment. * * @return The current annotation processor environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current annotation processing environment. * * @return The current annotation processing environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current annotation processing environment. * * @return The current annotation processing environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current environment. * * @return The current environment. */ protected AnnotationProcessorEnvironment getEnv() { return Context.getCurrentEnvironment(); }
/** * The current environment. * * @return The current environment. */ protected AnnotationProcessorEnvironment getEnv() { return Context.getCurrentEnvironment(); }
/** * The current environment. * * @return The current environment. */ protected AnnotationProcessorEnvironment getEnv() { return Context.getCurrentEnvironment(); }
/** * The current annotation processor environment. * * @return The current annotation processor environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current annotation processor environment. * * @return The current annotation processor environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current annotation processing environment. * * @return The current annotation processing environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current environment. * * @return The current environment. */ protected AnnotationProcessorEnvironment getEnv() { return Context.getCurrentEnvironment(); }
/** * The current annotation processing environment. * * @return The current annotation processing environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current annotation processing environment. * * @return The current annotation processing environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current annotation processor environment. * * @return The current annotation processor environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * The current annotation processing environment. * * @return The current annotation processing environment. */ protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() { return Context.getCurrentEnvironment(); }
/** * Get the messager for the current environment. * * @return The messager. */ protected Messager getMessager() { return Context.getCurrentEnvironment().getMessager(); }
/** * The collection of variables to establish in the model before processing. * * @return The collection of variables to establish in the model before processing. */ protected Collection<FreemarkerVariable> getVariables() { Collection<FreemarkerVariable> variables = new ArrayList<FreemarkerVariable>(); Map<String, String> options = Context.getCurrentEnvironment().getOptions(); String namespace = options.get(FreemarkerProcessorFactory.FM_LIBRARY_NS_OPTION); variables.add(new FreemarkerVariable(namespace, "aptOptions", options)); return variables; }
@Override protected void process(TemplateException e) { if (!(e instanceof ModelValidationException)) { Messager messager = Context.getCurrentEnvironment().getMessager(); StringWriter stackTrace = new StringWriter(); e.printStackTrace(new PrintWriter(stackTrace)); messager.printError(stackTrace.toString()); } this.ee = new EnunciateException(e); }
/** * Get the XML type for the specified type. * * @param type The type mirror. * @return The xml type for the specified type mirror. * @throws XmlTypeException If the type is invalid or unknown as an xml type. */ public static XmlType getXmlType(Class type) throws XmlTypeException { AnnotationProcessorEnvironment env = Context.getCurrentEnvironment(); TypeDeclaration declaration = env.getTypeDeclaration(type.getName()); return getXmlType(env.getTypeUtils().getDeclaredType(declaration)); }
/** * Get the XML type for the specified type. * * @param type The type mirror. * @return The xml type for the specified type mirror. * @throws XmlTypeException If the type is invalid or unknown as an xml type. */ public static XmlType getXmlType(Class type) throws XmlTypeException { AnnotationProcessorEnvironment env = Context.getCurrentEnvironment(); TypeDeclaration declaration = env.getTypeDeclaration(type.getName()); return getXmlType(env.getTypeUtils().getDeclaredType(declaration)); }
public void visitInterfaceType(InterfaceType interfaceType) { AdapterType adapterType = AdapterUtil.findAdapterType(interfaceType.getDeclaration()); if (adapterType == null) { //the interface isn't adapted, check for @XmlTransient and if it's there, narrow it to java.lang.Object. //see https://jira.codehaus.org/browse/ENUNCIATE-660 if (interfaceType.getDeclaration() != null && interfaceType.getDeclaration().getAnnotation(XmlTransient.class) != null) { AnnotationProcessorEnvironment env = Context.getCurrentEnvironment(); this.result = env.getTypeUtils().getDeclaredType(env.getTypeDeclaration(Object.class.getName())); } } }