Java源码示例:org.eclipse.xtend.lib.macro.declaration.MutableAnnotationTypeDeclaration

示例1
@Override
public void doTransform(final MutableClassDeclaration annotatedClass, @Extension final TransformationContext context) {
  super.doTransform(annotatedClass, context);
  Type _findTypeGlobally = context.findTypeGlobally(this.generatedAnnotationName(annotatedClass));
  final MutableAnnotationTypeDeclaration annotationType = ((MutableAnnotationTypeDeclaration) _findTypeGlobally);
  final Procedure1<MutableAnnotationTypeElementDeclaration> _function = (MutableAnnotationTypeElementDeclaration it) -> {
    it.setDocComment("Best building strategy game ever");
    it.setType(context.newTypeReference(Integer.TYPE));
    boolean _booleanValue = annotatedClass.findAnnotation(context.findTypeGlobally(ToAnno.class)).getBooleanValue("defaultValue");
    if (_booleanValue) {
      StringConcatenationClient _client = new StringConcatenationClient() {
        @Override
        protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
          _builder.append("1602");
        }
      };
      it.setDefaultValueExpression(_client);
    }
  };
  annotationType.addAnnotationTypeElement("anno", _function);
}
 
示例2
@Override
public MutableAnnotationTypeDeclaration findAnnotationType(final String qualifiedName) {
  final Type type = this.findType(qualifiedName);
  MutableAnnotationTypeDeclaration _switchResult = null;
  boolean _matched = false;
  if (type instanceof MutableAnnotationTypeDeclaration) {
    _matched=true;
    _switchResult = ((MutableAnnotationTypeDeclaration)type);
  }
  return _switchResult;
}
 
示例3
public void doTransform(List<? extends MutableAnnotationTypeDeclaration> annotatedAnnotationTypes, @Extension TransformationContext context) {
	for (MutableAnnotationTypeDeclaration annotatedAnnotationType : annotatedAnnotationTypes) {
		doTransform(annotatedAnnotationType, context);
	}
}
 
示例4
public MutableAnnotationTypeDeclaration findAnnotationType(final String qualifiedName) {
  return this.getTypeLookup().findAnnotationType(qualifiedName);
}
 
示例5
public MutableAnnotationTypeDeclaration findAnnotationType(final String qualifiedName) {
  return this.getTypeLookup().findAnnotationType(qualifiedName);
}
 
示例6
@Override
public Iterable<? extends MutableAnnotationTypeDeclaration> getDeclaredAnnotationTypes() {
  Iterable<? extends AnnotationTypeDeclaration> _declaredAnnotationTypes = super.getDeclaredAnnotationTypes();
  return ((Iterable<? extends MutableAnnotationTypeDeclaration>) _declaredAnnotationTypes);
}
 
示例7
@Override
public Iterable<? extends MutableAnnotationTypeDeclaration> getDeclaredAnnotationTypes() {
  Iterable<? extends AnnotationTypeDeclaration> _declaredAnnotationTypes = super.getDeclaredAnnotationTypes();
  return ((Iterable<? extends MutableAnnotationTypeDeclaration>) _declaredAnnotationTypes);
}
 
示例8
@Override
public Iterable<? extends MutableAnnotationTypeDeclaration> getDeclaredAnnotationTypes() {
  Iterable<? extends AnnotationTypeDeclaration> _declaredAnnotationTypes = super.getDeclaredAnnotationTypes();
  return ((Iterable<? extends MutableAnnotationTypeDeclaration>) _declaredAnnotationTypes);
}
 
示例9
@Override
public Iterable<? extends MutableAnnotationTypeDeclaration> getDeclaredAnnotationTypes() {
  Iterable<? extends AnnotationTypeDeclaration> _declaredAnnotationTypes = super.getDeclaredAnnotationTypes();
  return ((Iterable<? extends MutableAnnotationTypeDeclaration>) _declaredAnnotationTypes);
}
 
示例10
public MutableAnnotationTypeDeclaration findAnnotationType(final String arg0) {
  return this.delegate.findAnnotationType(arg0);
}
 
示例11
/**
 * @param qualifiedName
 *            the qualified name of the type to look up. Nested class delimiter is expected to be the '.' (dot).
 * @return the <code>MutableAnnotationTypeDeclaration</code> with given
 *         qualified name, or <code>null</code> if no such class declaration
 *         is contained in the currently processed
 *         <code>CompilationUnit</code>
 */
MutableAnnotationTypeDeclaration findAnnotationType(String qualifiedName);
 
示例12
/**
 * @param annotatedAnnotationType a mutable annotation type representation annotated with the annotation this processor is responsible for.
 * @param context
 */
public void doTransform(MutableAnnotationTypeDeclaration annotatedAnnotationType, @Extension TransformationContext context) {}