Exemplo n.º 1
0
 private bool IsProcedureAnnotationType(AnnotationMirror mirror)
 {
     return((new AnnotationTypeVisitor(typeof(Procedure))).visit(mirror.AnnotationType.asElement()));
 }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: protected abstract void process(javax.lang.model.element.TypeElement annotationType, javax.lang.model.element.Element annotated, javax.lang.model.element.AnnotationMirror annotation, java.util.Map<? extends javax.lang.model.element.ExecutableElement, ? extends javax.lang.model.element.AnnotationValue> values) throws java.io.IOException;
        protected internal abstract void process <T1>(TypeElement annotationType, Element annotated, AnnotationMirror annotation, IDictionary <T1> values) where T1 : javax.lang.model.element.ExecutableElement;
Exemplo n.º 3
0
 public DuplicatedProcedureError(Element element, AnnotationMirror annotationMirror, string errorMessage, params object[] args)
 {
     this._element          = element;
     this._annotationMirror = annotationMirror;
     this._errorMessage     = string.format(errorMessage, args);
 }
Exemplo n.º 4
0
 protected internal void Error(Element element, AnnotationMirror annotation, string message)
 {
     processingEnv.Messager.printMessage(Kind.ERROR, message, element, annotation);
 }
Exemplo n.º 5
0
 protected internal void Warn(Element element, AnnotationMirror annotation, string message)
 {
     processingEnv.Messager.printMessage(Kind.WARNING, message, element, annotation);
 }
Exemplo n.º 6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") @Override protected void process(javax.lang.model.element.TypeElement annotationType, javax.lang.model.element.Element annotated, javax.lang.model.element.AnnotationMirror annotation, java.util.Map<? extends javax.lang.model.element.ExecutableElement, ? extends javax.lang.model.element.AnnotationValue> values) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        protected internal override void Process <T1>(TypeElement annotationType, Element annotated, AnnotationMirror annotation, IDictionary <T1> values) where T1 : javax.lang.model.element.ExecutableElement
        {
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: for (javax.lang.model.element.AnnotationValue o : (java.util.List<? extends javax.lang.model.element.AnnotationValue>) values.values().iterator().next().getValue())
            foreach (AnnotationValue o in (IList <AnnotationValue>)values.Values.GetEnumerator().next().Value)
            {
                TypeMirror service = ( TypeMirror )o.Value;
                AddTo((( TypeElement )annotated).QualifiedName.ToString(), "META-INF", "services", service.ToString());
            }
        }
Exemplo n.º 7
0
 public ParameterMissingAnnotationError(Element element, AnnotationMirror mirror, string errorMessage, params object[] args)
 {
     this._element      = element;
     this._mirror       = mirror;
     this._errorMessage = string.format(errorMessage, args);
 }
Exemplo n.º 8
0
        protected internal override void Process <T1>(TypeElement annotationType, Element annotated, AnnotationMirror annotation, IDictionary <T1> values) where T1 : javax.lang.model.element.ExecutableElement
        {
            if (values.Count != 1)
            {
                Error(annotated, annotation, "Annotation values don't match the expectation");
                return;
            }
            string value = ( string )values.Values.GetEnumerator().next().Value;

            if (StringUtils.isBlank(value))
            {
                Error(annotated, annotation, "Documentation not available for " + annotated);
            }
        }