Tabnine Logo
JvmGenericType.isInterface
Code IndexAdd Tabnine to your IDE (free)

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

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

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

protected String getStyle(JvmGenericType type) {
  if (type.isInterface()) {
    return INTERFACE;
  } else if (type.isAbstract()) {
    return ABSTRACT_CLASS;
  } else {
    return CLASS;
  }
}
origin: io.sarl.lang/io.sarl.lang

/** Replies if the given JVM element is a SARL skill.
 *
 * @param type the JVM type to test.
 * @return {@code true} if the given type is a SARL skill, or not.
 * @since 0.6
 */
public boolean isSarlSkill(JvmGenericType type) {
  return !type.isInterface() && getSarlElementEcoreType(type) == SarlPackage.SARL_SKILL;
}
origin: io.sarl.lang/io.sarl.lang

/** Replies if the given JVM element is a SARL behavior.
 *
 * @param type the JVM type to test.
 * @return {@code true} if the given type is a SARL behavior, or not.
 * @since 0.6
 */
public boolean isSarlBehavior(JvmGenericType type) {
  return !type.isInterface() && getSarlElementEcoreType(type) == SarlPackage.SARL_BEHAVIOR;
}
origin: io.sarl.lang/io.sarl.lang

/** Replies if the given JVM element is a SARL capacity.
 *
 * @param type the JVM type to test.
 * @return {@code true} if the given type is a SARL capacity, or not.
 * @since 0.6
 */
public boolean isSarlCapacity(JvmGenericType type) {
  return type.isInterface() && getSarlElementEcoreType(type) == SarlPackage.SARL_CAPACITY;
}
origin: io.sarl.lang/io.sarl.lang

/** Replies if the given reference is pointing to a class type.
 *
 * @param typeRef - the type reference to test.
 * @return <code>true</code> if the pointed element is a class type.
 */
public static boolean isClass(LightweightTypeReference typeRef) {
  final JvmType t = typeRef.getType();
  if (t instanceof JvmGenericType) {
    return !((JvmGenericType) t).isInterface();
  }
  return false;
}
origin: io.sarl.lang/io.sarl.lang

/** Replies if the given JVM element is a SARL agent.
 *
 * @param type the JVM type to test.
 * @return {@code true} if the given type is a SARL agent, or not.
 * @since 0.6
 */
public boolean isSarlAgent(JvmGenericType type) {
  return !type.isInterface() && getSarlElementEcoreType(type) == SarlPackage.SARL_AGENT;
}
origin: org.eclipse.xtext.common/types

  public boolean apply(JvmTypeReference typeReference) {
    JvmType type = typeReference.getType();
    if (type instanceof JvmGenericType) {
      return ((JvmGenericType) type).isInterface();
    }
    return false;
  }
});
origin: io.sarl.lang/io.sarl.lang

/** Replies if the given JVM element is a SARL event.
 *
 * @param type the JVM type to test.
 * @return {@code true} if the given type is a SARL event, or not.
 * @since 0.6
 */
public boolean isSarlEvent(JvmGenericType type) {
  return !type.isInterface() && getSarlElementEcoreType(type) == SarlPackage.SARL_EVENT;
}
origin: org.eclipse.xtext/org.eclipse.xtext.xbase

@Override
public boolean isInterfaceType() {
  return type.eClass() == TypesPackage.Literals.JVM_GENERIC_TYPE && ((JvmGenericType) type).isInterface();
}

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

public JvmTypeReference getExtendedClass(JvmDeclaredType type) {
  for(JvmTypeReference candidate: type.getSuperTypes()) {
    JvmType candidateType = candidate.getType();
    if (candidateType instanceof JvmGenericType && !((JvmGenericType) candidateType).isInterface())
      return candidate;
  }
  return null;
}

origin: org.eclipse.xtext/org.eclipse.xtext.common.types

  @Override
  public boolean apply(JvmTypeReference typeReference) {
    JvmType type = typeReference.getType();
    if (type != null && type.eClass() == TypesPackage.Literals.JVM_GENERIC_TYPE) {
      return ((JvmGenericType) type).isInterface();
    }
    return false;
  }
});
origin: org.eclipse.xtext.common/types

protected boolean isClass(JvmType type) {
  if (type instanceof JvmArrayType)
    return isClass(((JvmArrayType) type).getComponentType());
  return type instanceof JvmGenericType && !((JvmGenericType) type).isInterface();
}
origin: io.sarl.lang/io.sarl.lang

/** Replies if the given type is an interface.
 *
 * @param type - the type to test.
 * @return <code>true</code> if the given type is an interface.
 */
public static boolean isInterface(LightweightTypeReference type) {
  return type.getType() instanceof JvmGenericType
      && ((JvmGenericType) type.getType()).isInterface();
}
origin: org.eclipse.xtext/org.eclipse.xtext.xbase

private boolean isClass(LightweightTypeReference typeRef) {
  return typeRef.getType() instanceof JvmGenericType && !((JvmGenericType)typeRef.getType()).isInterface();
}

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

/** Append the serial number field if and only if the container type is serializable.
 *
 * <p>The serial number field is computed from the given context and from the generated fields.
 *
 * @param context the current generation context.
 * @param source the source object.
 * @param target the inferred JVM object.
 * @see #appendSerialNumber(GenerationContext, XtendTypeDeclaration, JvmGenericType)
 */
protected void appendSerialNumberIfSerializable(GenerationContext context, XtendTypeDeclaration source, JvmGenericType target) {
  if (!target.isInterface() && this.inheritanceHelper.isSubTypeOf(target, Serializable.class, null)) {
    appendSerialNumber(context, source, target);
  }
}
origin: org.eclipse.xtext/org.eclipse.xtext.xbase

protected boolean isClass(JvmType type) {
  EClass eClass = type.eClass();
  if (eClass == TypesPackage.Literals.JVM_ARRAY_TYPE)
    return isClass(((JvmArrayType) type).getComponentType());
  return eClass == TypesPackage.Literals.JVM_GENERIC_TYPE && !((JvmGenericType) type).isInterface();
}

origin: org.eclipse.xtext.common/types

@Override
public JvmTypeReference getExtendedClass() {
  for(JvmTypeReference candidate: getSuperTypes()) {
    if (candidate.getType() instanceof JvmGenericType && !((JvmGenericType) candidate.getType()).isInterface())
      return candidate;
  }
  return null;
}
origin: org.eclipse.xtext/org.eclipse.xtext.xbase

private boolean isInvalidThisReference(IIdentifiableElementDescription desc) {
  EObject object = desc.getEObjectOrProxy();
  return object instanceof JvmGenericType && ((JvmGenericType) object).isInterface()
      && IFeatureNames.THIS.equals(desc.getName());
}
origin: org.eclipse.xtext/org.eclipse.xtext.common.types

@Override
public JvmTypeReference getExtendedClass() {
  for(JvmTypeReference candidate: getSuperTypes()) {
    if (candidate.getType() instanceof JvmGenericType && !((JvmGenericType) candidate.getType()).isInterface())
      return candidate;
  }
  return null;
}

origin: org.eclipse.xtext/org.eclipse.xtext.common.types

@Override
protected void setTypeModifiers(int accessFlags) {
  super.setTypeModifiers(accessFlags);
  if (result.eClass() != TypesPackage.Literals.JVM_GENERIC_TYPE) {
    result.setStatic(true);
  } else if (((JvmGenericType) result).isInterface()) {
    result.setStatic(true);
  }
}

org.eclipse.xtext.common.typesJvmGenericTypeisInterface

Javadoc

Returns the value of the 'Interface' attribute.

If the meaning of the 'Interface' attribute isn't clear, there really should be more of a description here...

Popular methods of JvmGenericType

  • getMembers
  • 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

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JButton (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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