Retrieve a bytecode descriptor representation of the parameter types.
@return the bytecode type descriptor
189389
public String [] getParamTypeDescriptors() {
        return methodType().parameterList().stream()
                .map(BSHType::getTypeDescriptor).toArray(String[]::new);
    }
812118
public String getTypeDescriptor(
        CallStack callstack, Interpreter interpreter, String defaultPackage )
    {
        // return cached type if available
        if ( descriptor != null )
            return descriptor;

        String descriptor;
        //  first node will either be PrimitiveType or AmbiguousName
        SimpleNode node = getTypeNode();
        if ( node instanceof BSHPrimitiveType )
            descriptor = getTypeDescriptor( ((BSHPrimitiveType)node).type );
        else
        {
            String clasName = ((BSHAmbiguousName)node).text;
            BshClassManager bcm = interpreter.getClassManager();
            // Note: incorrect here - we are using the hack in bsh class
            // manager that allows lookup by base name.  We need to eliminate
            // this limitation by working through imports.  See notes in class
            // manager.
            String definingClass = bcm.getClassBeingDefined( clasName );

            Class clas = null;
            if ( definingClass == null )
            {
                try {
                    clas = ((BSHAmbiguousName)node).toClass(
                        callstack, interpreter );
                } catch ( EvalError e ) {
                    // Lets assume we have a generics raw type
                    if (clasName.length() == 1)
                        clasName = "java.lang.Object";
                    //System.out.println("BSHType: "+node+" class not found");
                }
            } else
                clasName = definingClass;

            if ( clas != null )
            {
                //System.out.println("found clas: "+clas);
                descriptor = getTypeDescriptor( clas );
            }else
            {
                if ( defaultPackage == null || Name.isCompound( clasName ) )
                    descriptor = "L" + clasName.replace('.','/') + ";";
                else
                    descriptor =
                        "L"+defaultPackage.replace('.','/')+"/"+clasName + ";";
            }
        }

        for(int i=0; i<arrayDims; i++)
            descriptor = "["+descriptor;

        this.descriptor = descriptor;
    //System.out.println("BSHType: returning descriptor: "+descriptor);
        return descriptor;
    }
823931
public TypeDescription getArrayType() {

        Class<?> c = getTeaToolsUtils().getArrayType(mType);      
        if (mType == c) {
            return this;
        }

        return getTeaToolsUtils().createTypeDescription(c);
    }
70470
public JType getGenericType()
  {
    SignatureAttribute sigAttr = (SignatureAttribute) getAttribute("Signature");

    if (sigAttr != null) {
      return getClassLoader().parseParameterizedType(sigAttr.getSignature());
    }

    return getType();
  }
736999
@Override
    public String getCode() {
        
        if (fields == null) {
            fields = fetchFieldInfos();
        }

        String className = getClassName();

        ClassCode code = new ClassCode(ClassCode.SCOPE_PUBLIC, className);
        // to implements Codec interface
        code.addInteface(Codec.class.getName() + "<" + ClassHelper.getInternalName(cls.getCanonicalName()) + ">");

        // package
        code.setPkg(getPackage());
        // import classes
        genImportCode(code);

        // define Descriptor field
        String descriptorClsName = ClassHelper.getInternalName(Descriptor.class.getCanonicalName());
        code.addField(ClassCode.SCOPE_DEFAULT, descriptorClsName, "descriptor", null);

        // define class
        code.addMethod(getEncodeMethodCode());
        code.addMethod(getDecodeMethodCode());
        code.addMethod(getSizeMethodCode());
        code.addMethod(getWriteToMethodCode());
        code.addMethod(getReadFromMethodCode());
        code.addMethod(getGetDescriptorMethodCode());

        return code.toCode();
    }
572708
public String getGenericParamType() {
        int pos = type.indexOf("<");
        if (pos < 0) {
            return "";
        }
        return type.substring(pos + 1, type.length() - 1);
    }
805847
public ClassProject.CodeType getCodeType()
    {
        String code = this.toString();
        if ("THICK".equalsIgnoreCase(code))
            return ClassProject.CodeType.THICK;
        if ("THIN".equalsIgnoreCase(code))
            return ClassProject.CodeType.THIN;
        if ("RESOURCE_CODE".equalsIgnoreCase(code))
            return ClassProject.CodeType.RESOURCE_CODE;
        if ("RESOURCE_PROPERTIES".equalsIgnoreCase(code))
            return ClassProject.CodeType.RESOURCE_PROPERTIES;
        if ("INTERFACE".equalsIgnoreCase(code))
            return ClassProject.CodeType.INTERFACE;
        return null;
    }
1008601
public static String descriptor(Type type, Types types) {
    SigGen sig = new SigGen(types);
    sig.assembleSig(types.erasure(type));
    return sig.toString();
  }
1023032
public static String getDescriptor(final Class c) {
        StringBuffer buf = new StringBuffer();
        getDescriptor(buf, c);
        return buf.toString();
    }
528691
private Object getGetDescriptorMethodCode() {
        StringBuilder code = new StringBuilder();

        String descriptorClsName = ClassHelper.getInternalName(Descriptor.class.getCanonicalName());
        code.append("public ").append(descriptorClsName);
        code.append(" getDescriptor() throws IOException {").append(LINE_BREAK);
        code.append("if (this.descriptor != null) {").append(LINE_BREAK);
        code.append("return this.descriptor").append(JAVA_LINE_BREAK);
        code.append("}").append(LINE_BREAK);
        code.append(descriptorClsName).append(" descriptor = ");
        code.append("CodedConstant.getDescriptor(").append(ClassHelper.getInternalName(cls.getCanonicalName()))
                .append(JAVA_CLASS_FILE_SUFFIX).append(")").append(JAVA_LINE_BREAK);
        code.append("return (this.descriptor = descriptor)").append(JAVA_LINE_BREAK);
        code.append("}").append(LINE_BREAK);
        return code.toString();
    }
583575
public String getMethodDescriptor(ExecutableType method) {
    StringBuilder sb = new StringBuilder("(");
    for (TypeMirror t : method.getParameterTypes()) {
      sb.append(getSignatureName(t));
    }
    sb.append(")");
    sb.append(getSignatureName(method.getReturnType()));
    return sb.toString();
  }
717046
public static Type[] getArgumentTypes(final String methodDescriptor) {
    // First step: compute the number of argument types in methodDescriptor.
    int numArgumentTypes = 0;
    // Skip the first character, which is always a '('.
    int currentOffset = 1;
    // Parse the argument types, one at a each loop iteration.
    while (methodDescriptor.charAt(currentOffset) != ')') {
      while (methodDescriptor.charAt(currentOffset) == '[') {
        currentOffset++;
      }
      if (methodDescriptor.charAt(currentOffset++) == 'L') {
        while (methodDescriptor.charAt(currentOffset++) != ';') {
          // Skip the argument descriptor content.
        }
      }
      ++numArgumentTypes;
    }

    // Second step: create a Type instance for each argument type.
    Type[] argumentTypes = new Type[numArgumentTypes];
    // Skip the first character, which is always a '('.
    currentOffset = 1;
    // Parse and create the argument types, one at each loop iteration.
    int currentArgumentTypeIndex = 0;
    while (methodDescriptor.charAt(currentOffset) != ')') {
      final int currentArgumentTypeOffset = currentOffset;
      while (methodDescriptor.charAt(currentOffset) == '[') {
        currentOffset++;
      }
      if (methodDescriptor.charAt(currentOffset++) == 'L') {
        while (methodDescriptor.charAt(currentOffset++) != ';') {
          // Skip the argument descriptor content.
        }
      }
      argumentTypes[currentArgumentTypeIndex++] =
          getType(methodDescriptor, currentArgumentTypeOffset, currentOffset);
    }
    return argumentTypes;
  }
662939
@Override
    public MethodDescriptor getMethodDescriptor() {
        return DescriptorFactory.instance().getMethodDescriptor(ClassName.toSlashedClassName(getClassName()), getName(),
                getSignature(), isStatic());
    }
581798
private final Type getGenericType() {
        final Class<?> raw = getClass();
        final TypeVariable<?>[] typeParameters = raw.getTypeParameters();
        if (ArrayUtils.isEmpty(typeParameters)) {
            return raw;
        }
        final Type[] parameters = new Type[typeParameters.length];

        // use empty type variable map because we're relying on @BindTypeVariable functionality:
        final Map<TypeVariable<?>, Type> typeVariableMap = Collections.emptyMap();
        for (int i = 0; i < parameters.length; i++) {
            parameters[i] = Types.resolveAt(this, typeParameters[i], typeVariableMap);
        }
        return TypeUtils.parameterize(raw, parameters);
    }
225435
public String getDeptype() {
    if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_deptype == null)
      jcasType.jcas.throwFeatMissing("deptype", "com.digitalpebble.rasp.Dependency");
    return jcasType.ll_cas.ll_getStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_deptype);}
529153
public static String getMethodDescriptor(final Method m) {
        Class<?>[] parameters = m.getParameterTypes();
        StringBuffer buf = new StringBuffer();
        buf.append('(');
        for (int i = 0; i < parameters.length; ++i) {
            getDescriptor(buf, parameters[i]);
        }
        buf.append(')');
        getDescriptor(buf, m.getReturnType());
        return buf.toString();
    }
348016
public Type getParameterizedType() {
        Type tmp = parameterTypeCache;
        if (null == tmp) {
            tmp = executable.getAllGenericParameterTypes()[index];
            parameterTypeCache = tmp;
        }

        return tmp;
    }