Codota Logo
IType.isClass
Code IndexAdd Codota to your IDE (free)

How to use
isClass
method
in
org.eclipse.jdt.core.IType

Best Java code snippets using org.eclipse.jdt.core.IType.isClass (Showing top 20 results out of 315)

  • Common ways to obtain IType
private void myMethod () {
IType i =
  • Codota IconIMethod method;method.getDeclaringType()
  • Codota IconIJavaProject javaProject;String fullyQualifiedName;javaProject.findType(fullyQualifiedName)
  • Codota IconIMember member;member.getDeclaringType()
  • Smart code suggestions by Codota
}
origin: org.eclipse.pde/org.eclipse.pde.ui

  @Override
  public int category(Object element) {
    try {
      if (element instanceof IType) {
        if (((IType) element).isClass())
          return 1;
        return 0;
      }
    } catch (JavaModelException e) {
    }
    return 2;
  }
}
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see IClassFile
 */
public boolean isClass() throws JavaModelException {
  return getType().isClass();
}
/**
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * @see IClassFile
 */
public boolean isClass() throws JavaModelException {
  return getType().isClass();
}
/**
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see IClassFile
 */
@Override
public boolean isClass() throws JavaModelException {
  return getType().isClass();
}
/**
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * @see IClassFile
 */
public boolean isClass() throws JavaModelException {
  return getType().isClass();
}
/**
origin: org.eclipse/org.eclipse.ajdt.ui

private static boolean confirmAbstract(IMember element) throws JavaModelException {
  // never show the abstract symbol on interfaces or members in interfaces
  if (element.getElementType() == IJavaElement.TYPE) {
    return ((IType) element).isClass();
  }
  return element.getDeclaringType().isClass();
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * @see IClassFile
 */
public boolean isClass() throws JavaModelException {
  return getType().isClass();
}
/**
origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * @see IClassFile
 */
public boolean isClass() throws JavaModelException {
  return getType().isClass();
}
/**
origin: eclipse/eclipse.jdt.ls

private void addTypes(IType[] allSubtypes, HashSet<ICompilationUnit> cus, List<IType> types) throws JavaModelException {
  for (int i = 0; i < allSubtypes.length; i++) {
    IType type = allSubtypes[i];
    IField field = type.getField(NAME_FIELD);
    if (!field.exists()) {
      if (type.isClass() && cus.contains(type.getCompilationUnit())) {
        types.add(type);
      }
    }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void addTypes(IType[] allSubtypes, HashSet<ICompilationUnit> cus, List<IType> types) throws JavaModelException {
  for (int i= 0; i < allSubtypes.length; i++) {
    IType type= allSubtypes[i];
    IField field= type.getField(NAME_FIELD);
    if (!field.exists()) {
      if (type.isClass() && cus.contains(type.getCompilationUnit())){
        types.add(type);
      }
    }
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

private void addTypes(IType[] allSubtypes, HashSet cus, List types) throws JavaModelException {
  for (int i= 0; i < allSubtypes.length; i++) {
    IType type= allSubtypes[i];
    IField field= type.getField(NAME_FIELD);
    if (!field.exists()) {
      if (type.isClass() && cus.contains(type.getCompilationUnit())){
        types.add(type);
      }
    }
  }
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private void addTypes(IType[] allSubtypes, HashSet<ICompilationUnit> cus, List<IType> types) throws JavaModelException {
  for (int i= 0; i < allSubtypes.length; i++) {
    IType type= allSubtypes[i];
    IField field= type.getField(NAME_FIELD);
    if (!field.exists()) {
      if (type.isClass() && cus.contains(type.getCompilationUnit())){
        types.add(type);
      }
    }
  }
}
origin: org.eclipse/org.eclipse.jst.jsf.core

private boolean isAbstractClass(IType res) {	
  try {
    if (res.isClass() && Flags.isAbstract(res.getFlags()))
      return true;
  } catch (JavaModelException e) {
    //ignore
  }
  return false;
}

origin: org.eclipse/org.eclipse.jst.jsf.core

private boolean isInnerOrAnonymousClass(IType res) {
  try {
    if (res.isClass() && (res.isAnonymous() || 
                (Flags.isPrivate(res.getFlags())) || 
                res.getFullyQualifiedName().indexOf("$") > 0)) //must be better way to discover if it is an inner class //$NON-NLS-1$
      return true;
  } catch (JavaModelException e) {
    //ignore
  }
  return false;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public static boolean isExtractSupertypeAvailable(final IMember[] members) throws JavaModelException {
  if (members != null && members.length != 0) {
    final IType type= getTopLevelType(members);
    if (type != null && !type.isClass())
      return false;
    for (int index= 0; index < members.length; index++) {
      if (!isExtractSupertypeAvailable(members[index]))
        return false;
    }
    return members.length == 1 || isCommonDeclaringType(members);
  }
  return false;
}
origin: eclipse/eclipse.jdt.ls

  public static boolean isExtractClassAvailable(IType type) throws JavaModelException {
    if (type == null) {
      return false;
    }
    if (!type.exists()) {
      return false;
    }
    return ReorgUtils.isInsideCompilationUnit(type) && type.isClass() && !type.isAnonymous() && !type.isLambda();
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  public static boolean isExtractClassAvailable(IType type) throws JavaModelException {
    if (type == null)
      return false;
    if (!type.exists())
      return false;
    return ReorgUtils.isInsideCompilationUnit(type) && type.isClass() && !type.isAnonymous()  && !type.isLambda();
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  public static boolean isExtractClassAvailable(IType type) throws JavaModelException {
    if (type == null)
      return false;
    if (!type.exists())
      return false;
    return ReorgUtils.isInsideCompilationUnit(type) && type.isClass() && !type.isAnonymous()  && !type.isLambda();
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

static ImageDescriptor getImageDescriptor(IMember element) {
  int t= element.getElementType();
  if (t == IJavaElement.TYPE) {
    IType type= (IType) element;
    try {
      return getTypeImageDescriptor(type.isClass());
    } catch (CoreException e) {
      JavaPlugin.log(e);
      return JavaPluginImages.DESC_OBJS_GHOST;
    }
  }
  return getImageDescriptor(t);
}
origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e

 @Override
 public boolean test(IType candidate) {
  if (!super.test(candidate)) {
   return false;
  }
  try {
   return candidate.isClass() && !Flags.isAbstract(candidate.getFlags());
  }
  catch (JavaModelException e) {
   throw new SdkException("Unable to check for flags in type '" + candidate.getFullyQualifiedName() + "'.", e);
  }
 }
};
org.eclipse.jdt.coreITypeisClass

Javadoc

Returns whether this type represents a class.

Note that a class can neither be an interface, an enumeration class, nor an annotation type.

Popular methods of IType

  • getFullyQualifiedName
    Returns the fully qualified name of this type, including qualification for any containing types and
  • getElementName
    Returns the simple name of this type, unqualified by package or enclosing type. This is a handle-onl
  • getMethods
    Returns the methods and constructors declared by this type. For binary types, this may include the s
  • getFlags
  • getPackageFragment
    Returns the package fragment in which this element is defined. This is a handle-only method.
  • getCompilationUnit
  • newSupertypeHierarchy
    Creates and returns a type hierarchy for this type containing this type and all of its supertypes, c
  • exists
  • getJavaProject
  • isInterface
    Returns whether this type represents an interface. Note that an interface can also be an annotation
  • getDeclaringType
  • getMethod
    Returns the method with the specified name and parameter types in this type (for example, "foo", {"I
  • getDeclaringType,
  • getMethod,
  • getParent,
  • getSourceRange,
  • newTypeHierarchy,
  • isAnonymous,
  • isBinary,
  • getResource,
  • getTypeParameters

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • orElseThrow (Optional)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now