Package soot

Examples of soot.RefType


        Class<?> javaType = null;
        if (sootType instanceof PrimType) {
            PrimType primType = (PrimType) sootType;
            javaType = getPrimitiveType(primType);
        } else if (sootType instanceof RefType) {
            RefType refType = (RefType) sootType;
            javaType = getJavaClass(refType.getSootClass());
        } else if (sootType instanceof ArrayType) {
            // FIXME implement array type conversion
            return null;
        } else {
            throw new RuntimeException("Unknown type: " + sootType);
View Full Code Here


    }

    public String getXMLPlugSignature() {
        if (xmlPlugSignature == null) {
            final ArrayList<Object> args = new ArrayList<Object>();
            RefType objectArg = Scene.v().getSootClass(Object.class.getName())
                    .getType();
            RefType stringArg = Scene.v().getSootClass(String.class.getName())
                    .getType();
            args.add(stringArg);
            args.add(objectArg);
            xmlPlugSignature = SootMethod.getSignature(getSootClass(XML.class),
                    "plug", args, getSootClass(XML.class).getType());
View Full Code Here

                && hiearchy.isClassSubclassOfIncluding(actual, to);
    }

    public boolean isAbstractPersistable(Type type) {
        if (type instanceof RefType) {
            RefType refType = (RefType) type;
            // lazy
            if (abstractPersistables == null) {
                SootClass abstractPersistable = Scene.v().getSootClass(
                        AbstractPersistable.class.getName());
                abstractPersistables = getHiearchy().getSubclassesOf(
                        abstractPersistable);
            }
            return abstractPersistables.contains(refType.getSootClass());
        }
        return false;

    }
View Full Code Here

        if (from.equals(to)) {
            // same type
            assignable = true;
        } else if (from instanceof RefType && to instanceof RefType) {
            // reference type to reference type
            RefType fromRef = (RefType) from;
            RefType toRef = (RefType) to;
            if (hiearchy.isClassSubclassOfIncluding(fromRef.getSootClass(),
                    toRef.getSootClass())) {
                // subclass to super class
                assignable = true;
            }
        } else if (from instanceof NullType && to instanceof RefType) {
            // null to ReferenceType
View Full Code Here

        boolean usesSession = false;
        @SuppressWarnings("unchecked")
        final List<Type> parameterTypes = method.getParameterTypes();
        for (Type t : parameterTypes) {
            if (t instanceof RefType) {
                RefType refType = (RefType) t;
                usesSession = isSession(refType);
            } else if (t instanceof ArrayType) {
                // check if the array is a Session[]
                ArrayType arrayType = (ArrayType) t;
                Type type = arrayType.getElementType();
View Full Code Here

   */
  private boolean isImmutableType(Type type) {
      if (type instanceof ArrayType) {
          return false;
      } else if (type instanceof RefType) {
          RefType t = (RefType)type;
          if (t.getClassName().equals("dk.brics.xact.NodeList"))
              return true;
          return false;
      } else {
          return true;
      }
View Full Code Here

        // SubmitHandler instantiation. Any other instantiations
        // will have to have a method invoked at some later
        // point in time, in order to change the control flow.
        // When that happens, it is caught by the analysis.

        RefType type = newInstance.getBaseType();
        SootClass submitClass = type.getSootClass();
        List<SootMethod> queue = new ArrayList<SootMethod>();
        if (resolver.isSubmitHandler(submitClass))
            handleNewSubmitHandler(stateMachine, method, st, submitClass, queue);
        return queue;
    }
View Full Code Here

                            int index = intConstant.value;
                            Type oldType = varArgTypes[index];
                            Type type = jAssignStmt.getRightOp().getType();
                            if (oldType instanceof RefType
                                    && type instanceof RefType) {
                                RefType refType = (RefType) oldType;
                                RefType refType2 = (RefType) type;
                                type = resolver.getLeastCommonSupertypeOf(
                                        refType, refType2);
                            } else if (oldType == null || oldType.equals(type)) {
                                // do nothing, new type is good enough
                            } else {
View Full Code Here

            types.addAll(getReachingWebAppClassDescriptors((Local) value, st,
                    simpleLocalDefs, enclosingMethod));
        else if (value instanceof ClassConstant) {
            // constant class used
            ClassConstant classConstant = (ClassConstant) value;
            final RefType type = Scene.v()
                    .getSootClass(classConstant.getValue().replace('/', '.'))
                    .getType();
            types.add(type);
        } else {
            // unknown: warn
View Full Code Here

TOP

Related Classes of soot.RefType

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.