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

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding


    SourceTypeBinding sourceTypeBinding,
    char[] selector,
    TypeBinding[] argumentTypes,
    CompilationUnitScope refScope)
  {
    MethodBinding ret = sourceTypeBinding.getExactMethodBase(selector, argumentTypes,refScope);
   
    // An intertype declaration may override an inherited member (Bug#50776)
    for (int i=0, len=interTypeMethods.size(); i < len; i++) {
      MethodBinding im =
        (MethodBinding)interTypeMethods.get(i);
      if (matches(im, selector, argumentTypes)) {
        return im;
      }
    }
View Full Code Here


    // check for conflicts with existing methods, should really check type as well...
    //System.err.println("adding: " + binding + " to " + sourceTypeBinding);
    if (isVisible(binding, sourceTypeBinding)) {
      MethodBinding[] baseMethods = sourceTypeBinding.methods;
      for (int i=0, len=baseMethods.length; i < len; i++) {
        MethodBinding b = baseMethods[i];
        sourceTypeBinding.resolveTypesFor(b); // this will return fast if its already been done.
        if (matches(binding, b)) {
          // this always means we should remove the existing method
          if (b.sourceMethod() != null) {
            b.sourceMethod().binding = null;
          }
          sourceTypeBinding.removeMethod(i);
          //System.err.println("    left: " + Arrays.asList(sourceTypeBinding.methods));
          break;
        }
View Full Code Here

  public UnresolvedType getTypeX() {
    return typeX;
  }
 
  public void addMethod(EclipseFactory world , ResolvedMember member) {
    MethodBinding binding = world.makeMethodBinding(member);
    this.methods.add(binding);
  }
View Full Code Here

    ClassFile classFile = new ClassFile(this, enclosingClassFile, false);
    classFile.addFieldInfos();

    classFile.setForMethodInfos();
    for (Iterator i = methods.iterator(); i.hasNext(); ) {
      MethodBinding b = (MethodBinding)i.next();
      generateMethod(classFile, b);
    }

    classFile.addAttributes();
     
View Full Code Here

  public InterTypeMethodBinding(EclipseFactory world, ResolvedTypeMunger munger, UnresolvedType withinType,
                  AbstractMethodDeclaration sourceMethod)
  {
    super();
    ResolvedMember signature = munger.getSignature();
    MethodBinding mb = world.makeMethodBinding(signature,munger.getTypeVariableAliases());
    this.modifiers        = mb.modifiers;
    this.selector         = mb.selector;
    this.returnType       = mb.returnType;
    this.parameters       = mb.parameters;
    this.thrownExceptions = mb.thrownExceptions;
View Full Code Here

      if (existingMember != null) {
        // already have an implementation, so don't do anything
        if (onType == existingMember.getDeclaringType() && Modifier.isFinal(munger.getSignature().getModifiers())) {
          // final modifier on default implementation is taken to mean that
          // no-one else can provide an implementation
          MethodBinding offendingBinding = sourceType.getExactMethod(binding.selector, binding.parameters, sourceType.scope.compilationUnitScope());
          sourceType.scope.problemReporter().finalMethodCannotBeOverridden(offendingBinding, binding);
        }
        // so that we find methods from our superinterfaces later on...
        findOrCreateInterTypeMemberFinder(sourceType);
        return false;
View Full Code Here

  }
 
 
  private void mungeNewConstructor(SourceTypeBinding sourceType, NewConstructorTypeMunger munger) {   
    if (shouldTreatAsPublic()) {
      MethodBinding binding = world.makeMethodBinding(munger.getSignature(),munger.getTypeVariableAliases());
      findOrCreateInterTypeMemberFinder(sourceType).addInterTypeMethod(binding);
      //classScope.referenceContext.binding.addMethod(binding);
    } else {
      InterTypeMethodBinding binding =
        new InterTypeMethodBinding(world, munger, aspectType, sourceMethod);
View Full Code Here

    if (baseMethod.alwaysNeedsAccessMethod()) return baseMethod;
   
    ResolvedMember key = inAspect.factory.makeResolvedMember(baseMethod);
    if (accessors.containsKey(key)) return (MethodBinding)accessors.get(key);
   
    MethodBinding ret;
    if (baseMethod.isConstructor()) {
      ret = new MethodBinding(baseMethod, baseMethod.declaringClass);
      ret.modifiers = AstUtil.makePublic(ret.modifiers);
    } else {
      ret = inAspect.factory.makeMethodBinding(
      AjcMemberMaker.privilegedAccessMethodForMethod(inAspect.typeX, key)
      );
View Full Code Here

        typeVariableToTypeBinding.put(element,aliasTarget.typeVariables()[i++]);
      }
    }
   
    currentType = declaringType;
    MethodBinding mb =  new MethodBinding(member.getModifiers(),
        member.getName().toCharArray(),
        makeTypeBinding(member.getReturnType()),
        makeTypeBindings(member.getParameterTypes()),
        makeReferenceBindings(member.getExceptions()),
        declaringType);
View Full Code Here

   
    return tvBinding;
  }

  public MethodBinding makeMethodBindingForCall(Member member) {
    return new MethodBinding(member.getCallsiteModifiers(),
        member.getName().toCharArray(),
        makeTypeBinding(member.getReturnType()),
        makeTypeBindings(member.getParameterTypes()),
        new ReferenceBinding[0],
        (ReferenceBinding)makeTypeBinding(member.getDeclaringType()));
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding

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.