Package org.aspectj.org.eclipse.jdt.internal.compiler.ast

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


        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);

    CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
    Expression result = parser.parseExpression(source, offset, length, new CompilationUnitDeclaration(problemReporter, compilationResult, source.length));
   
    if (recordParsingInformation) {
      this.recordedParsingInformation = getRecordedParsingInformation(compilationResult, parser);
    }
    return result;
View Full Code Here


  boolean inBlockThatCantRun = false;

  public boolean visit(MessageSend call, BlockScope scope) {
    ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.OPTIMIZING_THIS_JOIN_POINT_CALLS, call.selector);
    Expression receiver = call.receiver;
    if (isRef(receiver, thisJoinPointDec)) {
      if (canTreatAsStatic(new String(call.selector))) {
        if (replaceEffectivelyStaticRefs) {
          replaceEffectivelyStaticRef(call);
        } else {
View Full Code Here

    checkInvocationArguments(scope,null,this.actualReceiverType,binding,
        this.arguments,binding.parameters,argsContainCast,this);

    for (int i=0, len=arguments.length; i < len; i++) {
      Expression arg = arguments[i];
      TypeBinding argType = arg.resolveType(scope);
      if (argType != null) {
        TypeBinding paramType = binding.parameters[i];
        if (!argType.isCompatibleWith(paramType)) {
          scope.problemReporter().typeMismatchError(argType, paramType, arg);
        }
View Full Code Here

    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference orgAspectJLangAnnotationAspect = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation atAspectAnnotation = new NormalAnnotation(orgAspectJLangAnnotationAspect,pos);
    if (!perclause.equals("")) {
      // we have to set the value
      Expression perclauseExpr = new StringLiteral(perclause.toCharArray(),pos,pos);
      MemberValuePair[] mvps = new MemberValuePair[1];
      mvps[0] = new MemberValuePair(value,pos,pos,perclauseExpr);
      atAspectAnnotation.memberValuePairs = mvps;
    }
    return atAspectAnnotation;
View Full Code Here

  public static Annotation createBeforeAnnotation(String pointcutExpression, String argNames, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,before};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
    MemberValuePair[] mvps = new MemberValuePair[2];
    mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
    mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
    ann.memberValuePairs = mvps;
    return ann;
  }
View Full Code Here

  public static Annotation createAfterAnnotation(String pointcutExpression, String argNames, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,after};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
    MemberValuePair[] mvps = new MemberValuePair[2];
    mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
    mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
    ann.memberValuePairs = mvps;
    return ann;
  }
View Full Code Here

  public static Annotation createAfterReturningAnnotation(String pointcutExpression,  String argNames, String extraArgumentName, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,afterReturning};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
    MemberValuePair[] mvps = new MemberValuePair[3];
    mvps[0] = new MemberValuePair("pointcut".toCharArray(),pos,pos,pcExpr);
    Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos);
    mvps[1] = new MemberValuePair("returning".toCharArray(),pos,pos,argExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
    mvps[2] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
    ann.memberValuePairs = mvps;
    return ann;
  }
View Full Code Here

  public static Annotation createAfterThrowingAnnotation(String pointcutExpression, String argNames, String extraArgumentName, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,afterThrowing};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
    MemberValuePair[] mvps = new MemberValuePair[3];
    mvps[0] = new MemberValuePair("pointcut".toCharArray(),pos,pos,pcExpr);
    Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos);
    mvps[1] = new MemberValuePair("throwing".toCharArray(),pos,pos,argExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
    mvps[2] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
    ann.memberValuePairs = mvps;
    return ann;
  }
View Full Code Here

  public static Annotation createAroundAnnotation(String pointcutExpression, String argNames, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,around};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
    MemberValuePair[] mvps = new MemberValuePair[2];
    mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
    mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
    ann.memberValuePairs = mvps;
    return ann;
  }
View Full Code Here

  public static Annotation createPointcutAnnotation(String pointcutExpression, String argNames, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,pointcut};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
    MemberValuePair[] mvps = new MemberValuePair[2];
    mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
    Expression argExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
    mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argExpr);
    ann.memberValuePairs = mvps;
    return ann; 
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression

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.