コード例 #1
0
  // TODO - AHK - Duplicate of method in AbstractElementTransformer
  @Override
  public IType getOwningIType() {
    IType owningType;
    if (_constructor instanceof IJavaConstructorInfo) {
      // We have to get the owner type from the method because it may be
      // different from the owning type e.g., entity aspects see ContactGosuAspect.AllAdresses
      IJavaClassConstructor m = ((IJavaConstructorInfo) _constructor).getJavaConstructor();
      if (m != null) {
        owningType = TypeSystem.get(m.getEnclosingClass());
      } else {
        owningType = _constructor.getOwnersType();
      }
    } else {
      owningType = _constructor.getOwnersType();
    }

    return owningType;
  }
コード例 #2
0
 @Override
 public IFunctionType getFunctionType() {
   if (_constructor instanceof IGosuConstructorInfo
       && !IGosuClass.ProxyUtil.isProxy(_constructor.getOwnersType())) {
     return (IFunctionType) ((IGosuConstructorInfo) _constructor).getDfs().getType();
   } else {
     return null;
   }
 }
コード例 #3
0
 @Override
 public IGenericTypeVariable[] getTypeVariables() {
   if (_constructor instanceof IGosuConstructorInfo
       && !IGosuClass.ProxyUtil.isProxy(_constructor.getOwnersType())) {
     return ((IGosuConstructorInfo) _constructor).getTypeVariables();
   } else {
     return null;
   }
 }
コード例 #4
0
  private static IRType getTrueOwningType(IConstructorInfo mi) {
    if (mi instanceof IJavaConstructorInfo) {
      // We have to get the owner type from the method because it may be different from the owning
      // type e.g., entity aspects see ContactGosuAspect.AllAdresses
      IJavaClassConstructor m = ((IJavaConstructorInfo) mi).getJavaConstructor();
      if (m != null) {
        return IRTypeResolver.getDescriptor(m.getEnclosingClass());
      }
    }

    return IRTypeResolver.getDescriptor(mi.getOwnersType());
  }
コード例 #5
0
 @Override
 public boolean couldHaveTypeVariables() {
   return _constructor instanceof IGosuMethodInfo
       && !IGosuClass.ProxyUtil.isProxy(_constructor.getOwnersType());
 }