Examples of TypeDeclaration


Examples of org.apache.felix.ipojo.extender.TypeDeclaration

     *
     * @param reference the service reference of the type declaration
     * @return the managed type object wrapping the service object.
     */
    public Object addingService(ServiceReference reference) {
        TypeDeclaration declaration = (TypeDeclaration) m_bundleContext.getService(reference);
        ManagedType managedType = new ManagedType(reference.getBundle().getBundleContext(), m_queueService, declaration);
        managedType.start();
        return managedType;
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.dom.TypeDeclaration

    if (node.getNodeType() != ASTNode.TYPE_DECLARATION) {
      createdNodeSource = generateSyntaxIncorrectAST();
      if (this.createdNode == null)
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS));
    } else {
      TypeDeclaration typeDeclaration = (TypeDeclaration) node;
      this.createdNode = (ASTNode) typeDeclaration.bodyDeclarations().iterator().next();
      createdNodeSource = this.source;
    }
    if (this.alteredName != null) {
      SimpleName newName = this.createdNode.getAST().newSimpleName(this.alteredName);
      SimpleName oldName = rename(this.createdNode, newName);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.dom.TypeDeclaration

  buff.append(this.source);
  buff.append(lineSeparator).append('}');
  ASTParser parser = ASTParser.newParser(AST.JLS3);
  parser.setSource(buff.toString().toCharArray());
  CompilationUnit compilationUnit = (CompilationUnit) parser.createAST(null);
  TypeDeclaration typeDeclaration = (TypeDeclaration) compilationUnit.types().iterator().next();
  List bodyDeclarations = typeDeclaration.bodyDeclarations();
  if (bodyDeclarations.size() != 0)
    this.createdNode = (ASTNode) bodyDeclarations.iterator().next();
  return buff.toString();
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration

    generatingToken = CompilationAndWeavingContext.enteringPhase(
        CompilationAndWeavingContext.GENERATING_UNWOVEN_CODE_FOR_COMPILATION_UNIT, unit.getFileName());
    if (eWorld.pushinCollector != null) {
      if (unit.types != null && unit.types.length > 0) {
        for (int t = 0; t < unit.types.length; t++) {
          TypeDeclaration type = unit.types[t];
          if (type.methods != null) {
            for (int m = 0; m < type.methods.length; m++) {
              AbstractMethodDeclaration md = type.methods[m];
              if (md instanceof InterTypeMethodDeclaration) {
                InterTypeMethodDeclaration itmd = ((InterTypeMethodDeclaration) md);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration

   */
  private boolean containsAnAspect(CompilationUnitDeclaration cud) {
    TypeDeclaration[] typeDecls = cud.types;
    if (typeDecls != null) {
      for (int i = 0; i < typeDecls.length; i++) { // loop through top level types in the file
        TypeDeclaration declaration = typeDecls[i];
        if (isAspect(declaration)) {
          return true;
        }
        if (declaration.memberTypes != null) {
          TypeDeclaration[] memberTypes = declaration.memberTypes;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration

      classFile.recordInnerClasses(this.binding);
    }

    if (this.memberTypes != null) {
      for (int i = 0, max = this.memberTypes.length; i < max; i++) {
        TypeDeclaration memberType = this.memberTypes[i];
        classFile.recordInnerClasses(memberType.binding);
        memberType.generateCode(this.scope, classFile);
      }
    }
    // generate all methods
    classFile.setForMethodInfos();
    if (this.methods != null) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration

    }   
   
    // propagate generation of (problem) member types
    if (typeDeclaration.memberTypes != null) {
      for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
        TypeDeclaration memberType = typeDeclaration.memberTypes[i];
        if (memberType.binding != null) {
          ClassFile.createProblemType(memberType, unitResult);
        }
      }
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration

      contents[contentsOffset++] = methodIndexByte1;
      contents[contentsOffset++] = methodIndexByte2;
      attributeNumber++;     
    }
    if (this.targetJDK >= ClassFileConstants.JDK1_5 && !this.creatingProblemType) {
      TypeDeclaration typeDeclaration = referenceBinding.scope.referenceContext;
      if (typeDeclaration != null) {
          // AspectJ Extension - use the original array if its set
        // original code:
        // final Annotation[] annotations = typeDeclaration.annotations;
        // new code:
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration

            constantPool.literalIndex(
              ((StringConstant) fieldConstant).stringValue());
          if (stringValueIndex == -1) {
            if (!creatingProblemType) {
              // report an error and abort: will lead to a problem type classfile creation
              TypeDeclaration typeDeclaration = referenceBinding.scope.referenceContext;
              FieldDeclaration[] fieldDecls = typeDeclaration.fields;
              for (int i = 0, max = fieldDecls.length; i < max; i++) {
                if (fieldDecls[i].binding == fieldBinding) {
                  // problem should abort
                  typeDeclaration.scope.problemReporter().stringConstantIsExceedingUtf8Limit(
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration

        int stringValueIndex =
          constantPool.literalIndex(((StringConstant) constant).stringValue().toCharArray());
        if (stringValueIndex == -1) {
          if (!creatingProblemType) {
            // report an error and abort: will lead to a problem type classfile creation
            TypeDeclaration typeDeclaration = referenceBinding.scope.referenceContext;
            typeDeclaration.scope.problemReporter().stringConstantIsExceedingUtf8Limit(defaultValue);
          } else {
            // already inside a problem type creation : no attribute
            contentsOffset = attributeOffset;
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.