congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JvmGenericType.getMembers
Code IndexAdd Tabnine to your IDE (free)

How to use
getMembers
method
in
org.eclipse.xtext.common.types.JvmGenericType

Best Java code snippets using org.eclipse.xtext.common.types.JvmGenericType.getMembers (Showing top 20 results out of 315)

origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

 @Override
 public void apply(final JvmGenericType it) {
  EmfParsleyDslJvmModelInferrer.this.setSuperClassTypeAndFields(it, viewerContentProvider, TableViewerContentProvider.class);
  EList<JvmMember> _members = it.getMembers();
  JvmConstructor _constructorWithInjectedAdapterFactory = EmfParsleyDslJvmModelInferrer.this.toConstructorWithInjectedAdapterFactory(viewerContentProvider);
  EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.<JvmConstructor>operator_add(_members, _constructorWithInjectedAdapterFactory);
  EmfParsleyDslJvmModelInferrer.this.inferContentProviderElements(it, viewerContentProvider.getElements());
 }
};
origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

 @Override
 public void apply(final JvmGenericType it) {
  EList<PolymorphicSpecification> _specifications = e.getSpecifications();
  for (final PolymorphicSpecification specification : _specifications) {
   EList<JvmMember> _members = it.getMembers();
   JvmOperation _specificationToMethod = EmfParsleyDslJvmModelInferrer.this.specificationToMethod(specification, methodName, returnType);
   EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _specificationToMethod);
  }
 }
};
origin: org.eclipse.xtext/org.eclipse.xtext.xbase

protected Iterable<JvmMember> _getMembersToBeCompiled(final JvmGenericType it) {
 Iterable<JvmMember> _xifexpression = null;
 boolean _isAnonymous = it.isAnonymous();
 if (_isAnonymous) {
  final Function1<JvmMember, Boolean> _function = (JvmMember it_1) -> {
   return Boolean.valueOf((!(it_1 instanceof JvmConstructor)));
  };
  _xifexpression = IterableExtensions.<JvmMember>filter(it.getMembers(), _function);
 } else {
  _xifexpression = this._getMembersToBeCompiled(((JvmDeclaredType) it));
 }
 return _xifexpression;
}

origin: org.eclipse.xtend/org.eclipse.xtend.core

@Override
protected Iterable<JvmMember> _getMembersToBeCompiled(final JvmGenericType it) {
 Iterable<JvmMember> _xifexpression = null;
 boolean _isLocal = it.isLocal();
 if (_isLocal) {
  final Function1<JvmMember, Boolean> _function = (JvmMember it_1) -> {
   return Boolean.valueOf((it_1 instanceof JvmOperation));
  };
  _xifexpression = IterableExtensions.<JvmMember>filter(it.getMembers(), _function);
 } else {
  _xifexpression = this._getMembersToBeCompiled(((JvmDeclaredType) it));
 }
 return _xifexpression;
}

origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

 @Override
 public void apply(final JvmGenericType it) {
  EmfParsleyDslJvmModelInferrer.this.setSuperClassTypeAndFields(it, viewerContentProvider, org.eclipse.emf.parsley.edit.ui.provider.ViewerContentProvider.class);
  EList<JvmMember> _members = it.getMembers();
  JvmConstructor _constructorWithInjectedAdapterFactory = EmfParsleyDslJvmModelInferrer.this.toConstructorWithInjectedAdapterFactory(viewerContentProvider);
  EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.<JvmConstructor>operator_add(_members, _constructorWithInjectedAdapterFactory);
  EmfParsleyDslJvmModelInferrer.this.inferContentProviderElements(it, viewerContentProvider.getElements());
  EmfParsleyDslJvmModelInferrer.this.inferContentProviderChildren(it, viewerContentProvider.getChildren());
 }
};
origin: org.eclipse.xtend/org.eclipse.xtend.core

public JvmConstructor getSuperTypeConstructor(AnonymousClass anonymousClass) {
  JvmGenericType superType = getSuperType(anonymousClass);
  if(superType != null) {
    JvmConstructor constructor = anonymousClass.getConstructorCall().getConstructor();
    for(JvmMember superMember: superType.getMembers()) {
      if(superMember instanceof JvmConstructor && isSameSignature(constructor, (JvmConstructor) superMember)) 
        return (JvmConstructor) superMember;
    }
  }
  return null;
}
origin: org.eclipse.xtend/org.eclipse.xtend.core

protected ArrayList<JvmMember> getAddedDeclarations(final JvmGenericType it, final AnonymousClass anonymousClass) {
 final ArrayList<JvmMember> result = CollectionLiterals.<JvmMember>newArrayList();
 final JvmConstructor constructor = anonymousClass.getConstructorCall().getConstructor();
 int _size = constructor.getParameters().size();
 boolean _greaterEqualsThan = (_size >= 1);
 if (_greaterEqualsThan) {
  result.add(0, constructor);
 }
 Iterable<JvmField> _declaredFields = it.getDeclaredFields();
 Iterables.<JvmMember>addAll(result, _declaredFields);
 final Function1<JvmOperation, Boolean> _function = (JvmOperation it_1) -> {
  EObject _head = IterableExtensions.<EObject>head(this.getSourceElements(it_1));
  final XtendFunction function = ((XtendFunction) _head);
  boolean _isOverride = function.isOverride();
  return Boolean.valueOf((!_isOverride));
 };
 Iterable<JvmOperation> _filter = IterableExtensions.<JvmOperation>filter(it.getDeclaredOperations(), _function);
 Iterables.<JvmMember>addAll(result, _filter);
 Iterable<JvmDeclaredType> _filter_1 = Iterables.<JvmDeclaredType>filter(it.getMembers(), JvmDeclaredType.class);
 Iterables.<JvmMember>addAll(result, _filter_1);
 return result;
}

origin: org.eclipse.xtend/org.eclipse.xtend.core

protected JvmConstructor inferAnonymousClassConstructor(AnonymousClass anonymousClass,
    JvmGenericType inferredLocalClass) {
  XConstructorCall constructorCall = anonymousClass.getConstructorCall();
  JvmConstructor constructor = TypesFactory.eINSTANCE.createJvmConstructor();
  inferredLocalClass.getMembers().add(constructor);
  associator.associatePrimary(constructorCall, constructor);
  constructor.setVisibility(JvmVisibility.DEFAULT);
  constructor.setSimpleName(inferredLocalClass.getSimpleName());
  return constructor;
}

origin: org.eclipse.xtend/org.eclipse.xtend.core

protected void addDefaultConstructor(XtendClass source, JvmGenericType target) {
  for (XtendMember member : source.getMembers()) {
    if (member instanceof XtendConstructor)
      return;
  }
  JvmConstructor constructor = typesFactory.createJvmConstructor();
  target.getMembers().add(constructor);
  associator.associate(source, constructor);
  constructor.setSimpleName(source.getName());
  constructor.setVisibility(JvmVisibility.PUBLIC);
  typeExtensions.setSynthetic(constructor, true);
}
origin: org.eclipse.viatra/org.eclipse.viatra.query.patternlanguage.emf

public void initializePatternGroup(final JvmGenericType groupClass, final PatternModel model, final JvmTypeReferenceBuilder builder, final EMFPatternLanguageGeneratorConfig config, final boolean includePrivate) {
 this.builder = builder;
 this._eMFJvmTypesBuilder.setDocumentation(groupClass, this._javadocInferrer.javadocGroupClass(model, includePrivate).toString());
 EList<JvmMember> _members = groupClass.getMembers();
 JvmOperation _inferInstanceMethod = this.inferInstanceMethod(model, groupClass);
 this._eMFJvmTypesBuilder.<JvmOperation>operator_add(_members, _inferInstanceMethod);
 EList<JvmMember> _members_1 = groupClass.getMembers();
 JvmField _inferInstanceField = this.inferInstanceField(model, groupClass);
 this._eMFJvmTypesBuilder.<JvmField>operator_add(_members_1, _inferInstanceField);
 EList<JvmMember> _members_2 = groupClass.getMembers();
 JvmConstructor _inferConstructor = this.inferConstructor(model, groupClass, includePrivate);
 this._eMFJvmTypesBuilder.<JvmConstructor>operator_add(_members_2, _inferConstructor);
 if (((!includePrivate) && (config.getMatcherGenerationStrategy() != EMFPatternLanguageGeneratorConfig.MatcherGenerationStrategy.USE_GENERIC))) {
  final Function1<Pattern, Boolean> _function = (Pattern it) -> {
   return Boolean.valueOf((this._eMFPatternLanguageJvmModelInferrerUtil.isPublic(it) && (!StringExtensions.isNullOrEmpty(it.getName()))));
  };
  Iterable<Pattern> _filter = IterableExtensions.<Pattern>filter(model.getPatterns(), _function);
  for (final Pattern pattern : _filter) {
   {
    EList<JvmMember> _members_3 = groupClass.getMembers();
    JvmOperation _inferSpecificationGetter = this.inferSpecificationGetter(pattern, groupClass, this._eMFPatternLanguageJvmModelInferrerUtil.findInferredSpecification(pattern));
    this._eMFJvmTypesBuilder.<JvmOperation>operator_add(_members_3, _inferSpecificationGetter);
    EList<JvmMember> _members_4 = groupClass.getMembers();
    JvmOperation _inferMatcherGetter = this.inferMatcherGetter(pattern, groupClass, this._eMFPatternLanguageJvmModelInferrerUtil.findInferredClass(pattern, BaseMatcher.class));
    this._eMFJvmTypesBuilder.<JvmOperation>operator_add(_members_4, _inferMatcherGetter);
   }
  }
 }
}

origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

private void handleBindingsSpecification(final JvmGenericType it, final BindingsSpecification bindingsSpecification) {
 EList<Binding> _bindings = bindingsSpecification.getBindings();
 for (final Binding binding : _bindings) {
  {
   JvmOperation method = null;
   if ((binding instanceof TypeBinding)) {
    method = this.genBindMethod(it, ((TypeBinding)binding));
   } else {
    if ((binding instanceof ProviderBinding)) {
     method = this.genProvideMethod(it, ((ProviderBinding)binding));
    } else {
     if ((binding instanceof ValueBinding)) {
      method = this.genValueMethod(it, ((ValueBinding)binding));
     }
    }
   }
   if ((method != null)) {
    EList<JvmMember> _members = it.getMembers();
    this._jvmTypesBuilder.<JvmOperation>operator_add(_members, method);
   }
  }
 }
}

origin: org.eclipse.xtext/org.eclipse.xtext.xbase

protected void completeJvmGenericType(JvmGenericType element) {
  // if no super type add Object
  ensureSuperTypeObject(element);
  addAnnotations(element);
  if (!element.isInterface()) {
    // if no constructors have been added, add a default constructor
    if (isEmpty(element.getDeclaredConstructors())) {
      JvmConstructor constructor = TypesFactory.eINSTANCE.createJvmConstructor();
      constructor.setSimpleName(element.getSimpleName());
      constructor.setVisibility(JvmVisibility.PUBLIC);
      typeExtensions.setSynthetic(constructor, true);
      EObject primarySourceElement = associations.getPrimarySourceElement(element);
      if (primarySourceElement != null) {
        associator.associate(primarySourceElement, constructor);
      }
      element.getMembers().add(constructor);
    }
  }
}
origin: org.testeditor/org.testeditor.tcl.dsl

/**
 * Performs the minimal initialization to a class - its super type and
 * its variables.
 */
private JvmGenericType toClass(final SetupAndCleanupProvider element, final boolean isPreIndexingPhase) {
 if (isPreIndexingPhase) {
  return this._jvmTypesBuilder.toClass(element, this.nameProvider.getFullyQualifiedName(element));
 } else {
  final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> {
   this.addSuperType(it, element);
   EList<JvmMember> _members = it.getMembers();
   Iterable<JvmField> _createFixtureVariables = this.createFixtureVariables(it, element);
   this._jvmTypesBuilder.<JvmMember>operator_add(_members, _createFixtureVariables);
  };
  return this._jvmTypesBuilder.toClass(element, this.nameProvider.getFullyQualifiedName(element), _function);
 }
}

origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

 @Override
 public void apply(final JvmGenericType it) {
  EList<JvmTypeReference> _superTypes = it.getSuperTypes();
  JvmTypeReference _typeRef = EmfParsleyDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(AbstractGuiceAwareExecutableExtensionFactory.class);
  EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef);
  EList<JvmMember> _members = it.getMembers();
  final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
   @Override
   public void apply(final JvmOperation it) {
    EmfParsleyDslJvmModelInferrer.this.addOverrideAnnotation(it);
    EList<JvmTypeReference> _exceptions = it.getExceptions();
    JvmTypeReference _typeRef = EmfParsleyDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(Exception.class);
    EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, _typeRef);
    StringConcatenationClient _client = new StringConcatenationClient() {
     @Override
     protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
      _builder.append("return ");
      _builder.append(injectorProviderClass);
      _builder.append(".getInjector();");
      _builder.newLineIfNotEmpty();
     }
    };
    EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _client);
   }
  };
  JvmOperation _method = EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.toMethod(element, "getInjector", EmfParsleyDslJvmModelInferrer.this._typeReferenceBuilder.typeRef(Injector.class), _function);
  EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
 }
};
origin: org.eclipse.xtend/org.eclipse.xtend.core

@Override
public MutableMethodDeclaration addMethod(final String name, final Procedure1<MutableMethodDeclaration> initializer) {
 this.checkMutable();
 ConditionUtils.checkJavaIdentifier(name, "name");
 Preconditions.checkArgument((initializer != null), "initializer cannot be null");
 final JvmOperation newMethod = TypesFactory.eINSTANCE.createJvmOperation();
 newMethod.setVisibility(JvmVisibility.PUBLIC);
 newMethod.setSimpleName(name);
 newMethod.setReturnType(this.getCompilationUnit().toJvmTypeReference(this.getCompilationUnit().getTypeReferenceProvider().getPrimitiveVoid()));
 newMethod.setAbstract(true);
 this.getDelegate().getMembers().add(newMethod);
 MemberDeclaration _memberDeclaration = this.getCompilationUnit().toMemberDeclaration(newMethod);
 final MutableMethodDeclaration mutableMethodDeclaration = ((MutableMethodDeclaration) _memberDeclaration);
 initializer.apply(mutableMethodDeclaration);
 return mutableMethodDeclaration;
}

origin: org.eclipse.xtend/org.eclipse.xtend.core

protected void transform(XtendConstructor source, JvmGenericType container) {
  JvmConstructor constructor = typesFactory.createJvmConstructor();
  container.getMembers().add(constructor);
  associator.associatePrimary(source, constructor);
  JvmVisibility visibility = source.getVisibility();
  constructor.setSimpleName(container.getSimpleName());
  constructor.setVisibility(visibility);
  for (XtendParameter parameter : source.getParameters()) {
    translateParameter(constructor, parameter);
  }
  copyAndFixTypeParameters(source.getTypeParameters(), constructor);
  for (JvmTypeReference exception : source.getExceptions()) {
    constructor.getExceptions().add(jvmTypesBuilder.cloneWithProxies(exception));
  }
  translateAnnotationsTo(source.getAnnotations(), constructor);
  setBody(constructor, source.getExpression());
  jvmTypesBuilder.copyDocumentationTo(source, constructor);
}

origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

private boolean featureAssociatedExpressionToMethod(final JvmGenericType it, final FeatureAssociatedExpression spec, final String prefix, final JvmTypeReference returnType, final Procedure2<? super JvmOperation, ? super FeatureAssociatedExpression> parameterCreator) {
 boolean _xifexpression = false;
 JvmMember _feature = spec.getFeature();
 String _simpleName = null;
 if (_feature!=null) {
  _simpleName=_feature.getSimpleName();
 }
 boolean _tripleNotEquals = (_simpleName != null);
 if (_tripleNotEquals) {
  EList<JvmMember> _members = it.getMembers();
  String _simpleName_1 = spec.getParameterType().getSimpleName();
  String _plus = (prefix + _simpleName_1);
  String _plus_1 = (_plus + "_");
  String _propertyNameForGetterSetterMethod = this._emfParsleyDslGeneratorUtils.getPropertyNameForGetterSetterMethod(spec.getFeature().getSimpleName());
  String _plus_2 = (_plus_1 + _propertyNameForGetterSetterMethod);
  final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
   @Override
   public void apply(final JvmOperation it) {
    parameterCreator.apply(it, spec);
    EmfParsleyDslJvmModelInferrer.this._jvmTypesBuilder.setBody(it, spec.getExpression());
   }
  };
  JvmOperation _method = this._jvmTypesBuilder.toMethod(spec, _plus_2, returnType, _function);
  _xifexpression = this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
 }
 return _xifexpression;
}

origin: io.sarl.lang/io.sarl.lang

field.setVolatile(false);
field.setFinal(true);
target.getMembers().add(field);
field.setType(this.typeBuilder.cloneWithProxies(this._typeReferenceBuilder.typeRef(long.class)));
final long serial = context.getSerial();
origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

@Override
public void apply(final JvmGenericType it) {
 EmfParsleyDslJvmModelInferrer.this.setSuperClassTypeAndFields(it, labelProvider, ViewerLabelProvider.class);
 EList<JvmMember> _members = it.getMembers();
 final Procedure1<JvmConstructor> _function = new Procedure1<JvmConstructor>() {
  @Override
origin: org.eclipse.xtend/org.eclipse.xtend.core

final String computeFieldName = computeFieldName(source);
field.setSimpleName(computeFieldName);
container.getMembers().add(field);
associator.associatePrimary(source, field);
field.setVisibility(source.getVisibility());
org.eclipse.xtext.common.typesJvmGenericTypegetMembers

Popular methods of JvmGenericType

  • isInterface
    Returns the value of the 'Interface' attribute. If the meaning of the 'Interface' attribute isn't cl
  • getSuperTypes
  • getTypeParameters
  • getDeclaredConstructors
  • setAbstract
  • setInterface
    Sets the value of the ' org.eclipse.xtext.common.types.JvmGenericType#isInterface' attribute.
  • setPackageName
  • setSimpleName
  • setVisibility
  • getAllFeatures
  • getSimpleName
  • isAbstract
  • getSimpleName,
  • isAbstract,
  • setFinal,
  • setStatic,
  • setStrictFloatingPoint,
  • getDeclaredFields,
  • getDeclaredOperations,
  • getIdentifier,
  • isFinal

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now