Package org.aspectj.org.eclipse.jdt.core

Examples of org.aspectj.org.eclipse.jdt.core.IType


/* (non-Javadoc)
* @see org.aspectj.org.eclipse.jdt.internal.core.search.IRestrictedAccessTypeRequestor#acceptType(int, char[], char[], char[][], java.lang.String, org.aspectj.org.eclipse.jdt.internal.compiler.env.AccessRestriction)
*/
public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path, AccessRestriction access) {
  try {
    IType type = null;
    if (this.handleFactory != null) {
      Openable openable = this.handleFactory.createOpenable(path, this.scope);
      if (openable == null) return;
      switch (openable.getElementType()) {
        case IJavaElement.COMPILATION_UNIT:
          ICompilationUnit cu = (ICompilationUnit) openable;
          if (enclosingTypeNames != null && enclosingTypeNames.length > 0) {
            type = cu.getType(new String(enclosingTypeNames[0]));
            for (int j=1, l=enclosingTypeNames.length; j<l; j++) {
              type = type.getType(new String(enclosingTypeNames[j]));
            }
            type = type.getType(new String(simpleTypeName));
          } else {
            type = cu.getType(new String(simpleTypeName));
          }
          break;
        case IJavaElement.CLASS_FILE:
View Full Code Here


  }
  String simpleName= simpleNames[length];
  if (org.aspectj.org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(simpleName)) {
    ICompilationUnit unit= pkgFragment.getCompilationUnit(simpleName);
    int etnLength = enclosingTypeNames == null ? 0 : enclosingTypeNames.length;
    IType type = (etnLength == 0) ? unit.getType(simpleTypeName) : unit.getType(new String(enclosingTypeNames[0]));
    if (etnLength > 0) {
      for (int i=1; i<etnLength; i++) {
        type = type.getType(new String(enclosingTypeNames[i]));
      }
      type = type.getType(simpleTypeName);
    }
    return type;
  } else {
    IClassFile classFile= pkgFragment.getClassFile(simpleName);
    return classFile.getType();
View Full Code Here

/**
* @see CreateTypeMemberOperation#verifyNameCollision
*/
protected IJavaModelStatus verifyNameCollision() {
  if (this.createdNode != null) {
    IType type = getType();
    String name;
    if (((MethodDeclaration) this.createdNode).isConstructor())
      name = type.getElementName();
    else
      name = getASTNodeName();
    String[] types = convertASTMethodTypesToSignatures();
    if (type.getMethod(name, types).exists()) {
      return new JavaModelStatus(
        IJavaModelStatusConstants.NAME_COLLISION,
        Messages.bind(Messages.status_nameCollision, name));
    }
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.core.IType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.