Java Code Examples for org.eclipse.xtend.lib.annotations.Delegate

The following examples show how to use org.eclipse.xtend.lib.annotations.Delegate. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: xtext-lib   Source File: DelegateProcessor.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public Iterable<? extends MemberDeclaration> getDelegates(final TypeDeclaration it) {
  final Function1<MemberDeclaration, Boolean> _function = (MemberDeclaration it_1) -> {
    AnnotationReference _findAnnotation = it_1.findAnnotation(this.context.findTypeGlobally(Delegate.class));
    return Boolean.valueOf((_findAnnotation != null));
  };
  return IterableExtensions.filter(it.getDeclaredMembers(), _function);
}
 
Example 2
Source Project: xtext-core   Source File: GeneratorNodeProcessor.java    License: Eclipse Public License 2.0 5 votes vote down vote up
@Delegate
public ITextRegionWithLineInformation getDelegate() {
	if (delegate == null) {
		throw new IllegalStateException("region not completed");
	}
	return delegate;
}
 
Example 3
Source Project: sarl   Source File: SARLValidator.java    License: Apache License 2.0 5 votes vote down vote up
/** Replies if the given annotation is an active annotation for object-oriented elements.
 *
 * @param annotation the annotation.
 * @return {@code true} if the annotation should be used only for OO elements.
 * @see #isAOActiveAnnotation(XAnnotation)
 */
@SuppressWarnings("static-method")
protected boolean isOOActiveAnnotation(XAnnotation annotation) {
	final String name = annotation.getAnnotationType().getQualifiedName();
	return Strings.equal(Accessors.class.getName(), name)
			|| Strings.equal(Data.class.getName(), name)
			|| Strings.equal(Delegate.class.getName(), name)
			|| Strings.equal(ToString.class.getName(), name);
}
 
Example 4
Source Project: xtext-lib   Source File: DelegateProcessor.java    License: Eclipse Public License 2.0 4 votes vote down vote up
public Set<TypeReference> listedInterfaces(final MemberDeclaration it) {
  return IterableExtensions.<TypeReference>toSet(((Iterable<TypeReference>)Conversions.doWrapArray(it.findAnnotation(this.context.findTypeGlobally(Delegate.class)).getClassArrayValue("value"))));
}
 
Example 5
@Delegate
public FileLocations getFileLocations() {
  return this.unit.getFileLocations();
}
 
Example 6
@Delegate
public MutableFileSystemSupport getFileSystemSupport() {
  return this.unit.getFileSystemSupport();
}
 
Example 7
@Delegate
public GlobalTypeLookup getGlobalTypeLookup() {
  return this.unit.getTypeLookup();
}
 
Example 8
@Delegate
public Tracability getTracability() {
  return this.unit.getTracability();
}
 
Example 9
Source Project: xtext-xtend   Source File: ValidationContextImpl.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Delegate
public ProblemSupport getProblemSupport() {
  return this.unit.getProblemSupport();
}
 
Example 10
Source Project: xtext-xtend   Source File: ValidationContextImpl.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Delegate
public TypeLookup getTypeLookup() {
  return this.unit.getTypeLookup();
}
 
Example 11
Source Project: xtext-xtend   Source File: ValidationContextImpl.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Delegate
public TypeReferenceProvider getTypeReferenceProvider() {
  return this.unit.getTypeReferenceProvider();
}
 
Example 12
Source Project: xtext-xtend   Source File: ValidationContextImpl.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Delegate
public AnnotationReferenceProvider getAnnotationReferenceProvider() {
  return this.unit.getAnnotationReferenceProvider();
}
 
Example 13
Source Project: xtext-xtend   Source File: ValidationContextImpl.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Delegate
public FileSystemSupport getFileSystemSupport() {
  return this.unit.getFileSystemSupport();
}
 
Example 14
Source Project: xtext-xtend   Source File: ValidationContextImpl.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Delegate
public FileLocations getFileLocations() {
  return this.unit.getFileLocations();
}
 
Example 15
Source Project: xtext-xtend   Source File: ValidationContextImpl.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Delegate
public Tracability getTracability() {
  return this.unit.getTracability();
}
 
Example 16
@Delegate
public ProblemSupport getProblemSupport() {
  return this.unit.getProblemSupport();
}
 
Example 17
@Delegate
public TypeLookup getTypeLookup() {
  return this.unit.getTypeLookup();
}
 
Example 18
@Delegate
public TypeReferenceProvider getTypeReferenceProvider() {
  return this.unit.getTypeReferenceProvider();
}
 
Example 19
@Delegate
public AnnotationReferenceProvider getAnnotationReferenceProvider() {
  return this.unit.getAnnotationReferenceProvider();
}
 
Example 20
@Delegate
public FileSystemSupport getFileSystemSupport() {
  return this.unit.getFileSystemSupport();
}
 
Example 21
@Delegate
public FileLocations getFileLocations() {
  return this.unit.getFileLocations();
}
 
Example 22
@Delegate
public Tracability getTracability() {
  return this.unit.getTracability();
}
 
Example 23
@Delegate
public Associator getAssociator() {
  return this.unit.getAssociator();
}
 
Example 24
@Delegate
public FileSystemSupport getFileSystemSupport() {
  return this.compilationUnit.getFileSystemSupport();
}
 
Example 25
@Delegate
public FileLocations getFileLocations() {
  return this.compilationUnit.getFileLocations();
}
 
Example 26
@Delegate
public TypeLookupImpl getTypeLookup() {
  return this.compilationUnit.getTypeLookup();
}
 
Example 27
@Delegate
public TypeReference throwInferredTypeException(final String methodName) {
  String _message = this.message(methodName);
  throw new IllegalStateException(_message);
}