Examples of GenericSignatureParser


Examples of edu.umd.cs.findbugs.ba.generic.GenericSignatureParser

        }
        //
        XMethod m = getXMethod();
        String sourceSig = m.getSourceSignature();
        if (sourceSig != null) {
            GenericSignatureParser sig = new GenericSignatureParser(sourceSig);
            String genericReturnValue = sig.getReturnTypeSignature();
            Type t = GenericUtilities.getType(genericReturnValue);
            if (t instanceof GenericObjectType) {
                funky = true;
            }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.generic.GenericSignatureParser

                XMethod m2 = m.bridgeTo();
                if (m2 != null) {
                    m = m2;
                }
                if (sourceSignature != null && !sourceSignature.equals(m.getSignature())) {
                    GenericSignatureParser p = new GenericSignatureParser(sourceSignature);
                    String rv = p.getReturnTypeSignature();
                    if (rv.charAt(0) != 'T') {
                        try {
                            Type t = GenericUtilities.getType(rv);
                            if (t != null) {
                                assert t.getType() != T_VOID;
                                result = merge(result, t);
                                foundSomething = true;
                            }
                        } catch (RuntimeException e) {
                            AnalysisContext.logError("Problem analyzing call to " + m + " with source signature"
                                    + sourceSignature, e);
                            break;
                        }
                    }
                }

                if (m == m2) {
                    SignatureParser p = new SignatureParser(m.getSignature());
                    String rv = p.getReturnTypeSignature();

                    Type t = Type.getType(rv);
                    result = merge(result, t);
                    foundSomething = true;
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.GenericSignatureParser

   
    public static UnresolvedType forGenericTypeSignature(String sig,String declaredGenericSig) {
      UnresolvedType ret = UnresolvedType.forSignature(sig);
      ret.typeKind=TypeKind.GENERIC;
     
      ClassSignature csig = new GenericSignatureParser().parseAsClassSignature(declaredGenericSig);
     
      Signature.FormalTypeParameter[] ftps = csig.formalTypeParameters;
      ret.typeVariables = new TypeVariable[ftps.length];
      for (int i = 0; i < ftps.length; i++) {
      Signature.FormalTypeParameter parameter = ftps[i];
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.GenericSignatureParser

   private void unpackGenericSignature() {
     if (unpackedGenericSignature) return;
     unpackedGenericSignature = true;
     String gSig = method.getGenericSignature();
     if (gSig != null) {
       Signature.MethodTypeSignature mSig = new GenericSignatureParser().parseAsMethodSignature(method.getGenericSignature());
        if (mSig.formalTypeParameters.length > 0) {
        // generic method declaration
        canBeParameterized = true;
       }
        Signature.FormalTypeParameter[] parentFormals = bcelObjectType.getAllFormals();
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.GenericSignatureParser

      return;
    unpackedGenericSignature = true;
    String gSig = field.getGenericSignature();
    if (gSig != null) {
      // get from generic
      Signature.FieldTypeSignature fts = new GenericSignatureParser().parseAsFieldSignature(gSig);
      Signature.ClassSignature genericTypeSig = bcelObjectType.getGenericClassTypeSignature();

      Signature.FormalTypeParameter[] parentFormals = bcelObjectType.getAllFormals();
      Signature.FormalTypeParameter[] typeVars =
        ((genericTypeSig == null) ? new Signature.FormalTypeParameter[0] : genericTypeSig.formalTypeParameters);
View Full Code Here

Examples of org.aspectj.util.GenericSignatureParser

  public static UnresolvedType forGenericTypeSignature(String sig, String declaredGenericSig) {
    UnresolvedType ret = UnresolvedType.forSignature(sig);
    ret.typeKind = TypeKind.GENERIC;

    ClassSignature csig = new GenericSignatureParser().parseAsClassSignature(declaredGenericSig);

    GenericSignature.FormalTypeParameter[] ftps = csig.formalTypeParameters;
    ret.typeVariables = new TypeVariable[ftps.length];
    for (int i = 0; i < ftps.length; i++) {
      GenericSignature.FormalTypeParameter parameter = ftps[i];
View Full Code Here

Examples of org.aspectj.util.GenericSignatureParser

      genericParameterTypes = getParameterTypes();
      return;
    }
    String gSig = method.getGenericSignature();
    if (gSig != null) {
      GenericSignature.MethodTypeSignature mSig = new GenericSignatureParser().parseAsMethodSignature(gSig);// method
      // .
      // getGenericSignature
      // ());
      if (mSig.formalTypeParameters.length > 0) {
        // generic method declaration
View Full Code Here

Examples of org.aspectj.util.GenericSignatureParser

  public GenericSignature.ClassSignature getGenericClassTypeSignature() {
    if (cachedGenericClassTypeSignature == null) {
      String sig = getDeclaredGenericSignature();
      if (sig != null) {
        GenericSignatureParser parser = new GenericSignatureParser();
        cachedGenericClassTypeSignature = parser.parseAsClassSignature(sig);
      }
    }
    return cachedGenericClassTypeSignature;
  }
View Full Code Here

Examples of org.aspectj.util.GenericSignatureParser

  public static UnresolvedType forGenericTypeSignature(String sig, String declaredGenericSig) {
    UnresolvedType ret = UnresolvedType.forSignature(sig);
    ret.typeKind = TypeKind.GENERIC;

    ClassSignature csig = new GenericSignatureParser().parseAsClassSignature(declaredGenericSig);

    GenericSignature.FormalTypeParameter[] ftps = csig.formalTypeParameters;
    ret.typeVariables = new TypeVariable[ftps.length];
    for (int i = 0; i < ftps.length; i++) {
      GenericSignature.FormalTypeParameter parameter = ftps[i];
View Full Code Here

Examples of org.aspectj.util.GenericSignatureParser

    }
    unpackedGenericSignature = true;
    String gSig = field.getGenericSignature();
    if (gSig != null) {
      // get from generic
      GenericSignature.FieldTypeSignature fts = new GenericSignatureParser().parseAsFieldSignature(gSig);
      GenericSignature.ClassSignature genericTypeSig = bcelObjectType.getGenericClassTypeSignature();

      GenericSignature.FormalTypeParameter[] parentFormals = bcelObjectType.getAllFormals();
      GenericSignature.FormalTypeParameter[] typeVars = ((genericTypeSig == null) ? new GenericSignature.FormalTypeParameter[0]
          : genericTypeSig.formalTypeParameters);
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.