Codota Logo
TypeVariable.getType
Code IndexAdd Codota to your IDE (free)

How to use
getType
method
in
com.ibm.wala.analysis.typeInference.TypeVariable

Best Java code snippets using com.ibm.wala.analysis.typeInference.TypeVariable.getType (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: wala/WALA

/**
 * Return the type computed for a particular value number
 */
public TypeAbstraction getType(int valueNumber) {
 if (valueNumber < 0) {
  throw new IllegalArgumentException("bad value number " + valueNumber);
 }
 TypeVariable variable = getVariable(valueNumber);
 assert variable != null : "null variable for value number " + valueNumber;
 return variable.getType();
}
origin: com.ibm.wala/com.ibm.wala.core

/**
 * Return the type computed for a particular value number
 */
public TypeAbstraction getType(int valueNumber) {
 if (valueNumber < 0) {
  throw new IllegalArgumentException("bad value number " + valueNumber);
 }
 TypeVariable variable = getVariable(valueNumber);
 assert variable != null : "null variable for value number " + valueNumber;
 return variable.getType();
}
origin: com.ibm.wala/com.ibm.wala.core

/**
 * TODO: work on efficiency shortcuts for this.
 */
@Override
public byte evaluate(TypeVariable lhs, TypeVariable[] rhsOperands) {
 TypeAbstraction lhsType = lhs.getType();
 TypeVariable rhs = rhsOperands[0];
 TypeAbstraction rhsType = rhs.getType();
 if (lhsType.equals(rhsType)) {
  return NOT_CHANGED;
 } else {
  lhs.setType(rhsType);
  return CHANGED;
 }
}
origin: wala/WALA

/**
 * TODO: work on efficiency shortcuts for this.
 */
@Override
public byte evaluate(TypeVariable lhs, TypeVariable[] rhsOperands) {
 TypeAbstraction lhsType = lhs.getType();
 TypeVariable rhs = rhsOperands[0];
 TypeAbstraction rhsType = rhs.getType();
 if (lhsType.equals(rhsType)) {
  return NOT_CHANGED;
 } else {
  lhs.setType(rhsType);
  return CHANGED;
 }
}
origin: wala/WALA

@Override
public byte evaluate(TypeVariable lhs, TypeVariable[] rhs) {
 TypeAbstraction lhsType = lhs.getType();
 TypeAbstraction meet = TypeAbstraction.TOP;
 for (TypeVariable r : rhs) {
  if (r != null  && r.getType() != null) {
   meet = meet.meet(r.getType());
  }
 }
 if (lhsType.equals(meet)) {
  return NOT_CHANGED;
 } else {
  lhs.setType(meet);
  return CHANGED;
 }
}
origin: com.ibm.wala/com.ibm.wala.core

@Override
public byte evaluate(TypeVariable lhs, TypeVariable[] rhs) {
 TypeAbstraction lhsType = lhs.getType();
 TypeAbstraction meet = TypeAbstraction.TOP;
 for (TypeVariable r : rhs) {
  if (r != null  && r.getType() != null) {
   meet = meet.meet(r.getType());
  }
 }
 if (lhsType.equals(meet)) {
  return NOT_CHANGED;
 } else {
  lhs.setType(meet);
  return CHANGED;
 }
}
origin: com.ibm.wala/com.ibm.wala.core

TypeAbstraction lhsType = lhs.getType();
TypeAbstraction meet = TypeAbstraction.TOP;
for (TypeVariable r : rhs) {
 if (r != null && r.getType() != null) {
  meet = meet.meet(r.getType());
origin: wala/WALA

TypeAbstraction lhsType = lhs.getType();
TypeAbstraction meet = TypeAbstraction.TOP;
for (TypeVariable r : rhs) {
 if (r != null && r.getType() != null) {
  meet = meet.meet(r.getType());
origin: wala/WALA

public boolean isUndefined(int valueNumber) {
 // TODO: Julian, you seem to be using BOTTOM in the European style.
 // Steve's code assumes American style (god forbid), so what you're getting
 // here
 // is not undefined, but java.lang.Object [NR/EY]
 if (getVariable(valueNumber) == null) {
  return true;
 }
 TypeAbstraction ta = getVariable(valueNumber).getType();
 return ta == BOTTOM || ta.getType() == null;
}
origin: com.ibm.wala/com.ibm.wala.core

public boolean isUndefined(int valueNumber) {
 // TODO: Julian, you seem to be using BOTTOM in the European style.
 // Steve's code assumes American style (god forbid), so what you're getting
 // here
 // is not undefined, but java.lang.Object [NR/EY]
 if (getVariable(valueNumber) == null) {
  return true;
 }
 TypeAbstraction ta = getVariable(valueNumber).getType();
 return ta == BOTTOM || ta.getType() == null;
}
origin: wala/WALA

/**
 * Extract all results of the type inference analysis.
 * 
 * @return an array, where the i'th variable holds the type abstraction of the i'th value number.
 */
public TypeAbstraction[] extractAllResults() {
 int numberOfVars = ir.getSymbolTable().getMaxValueNumber() + 1;
 TypeAbstraction[] ret = new TypeAbstraction[numberOfVars];
 for (int i = 0; i < numberOfVars; ++i) {
  TypeVariable var = getVariable(i);
  ret[i] = var == null ? null : var.getType();
 }
 return ret;
}
origin: com.ibm.wala/com.ibm.wala.core

/**
 * Extract all results of the type inference analysis.
 * 
 * @return an array, where the i'th variable holds the type abstraction of the i'th value number.
 */
public TypeAbstraction[] extractAllResults() {
 int numberOfVars = ir.getSymbolTable().getMaxValueNumber() + 1;
 TypeAbstraction[] ret = new TypeAbstraction[numberOfVars];
 for (int i = 0; i < numberOfVars; ++i) {
  TypeVariable var = getVariable(i);
  ret[i] = var == null ? null : var.getType();
 }
 return ret;
}
origin: wala/WALA

 if (doPrimitives && lhs.getType() == TypeAbstraction.TOP) {
  lhs.setType(PrimitiveType.getPrimitive(elementType));
  return CHANGED;
if (lhs.getType() != TypeAbstraction.TOP) {
 TypeReference tType = null;
 if (lhs.getType() instanceof PointType) {
  tType = ((PointType) lhs.getType()).getType().getReference();
 } else if (lhs.getType() instanceof ConeType) {
  tType = ((ConeType) lhs.getType()).getType().getReference();
 } else {
  Assertions.UNREACHABLE("Unexpected type " + lhs.getType().getClass());
origin: com.ibm.wala/com.ibm.wala.cast.java

  TypeAbstraction ta = r.getType();
  if (ta instanceof PointType) {
   if (ta.getType().equals(getStringClass())) {
} else {
 TypeVariable L = lhs;
 TypeAbstraction lhsType = L.getType();
origin: wala/WALA

  TypeAbstraction ta = r.getType();
  if (ta instanceof PointType) {
   if (ta.getType().equals(getStringClass())) {
} else {
 TypeVariable L = lhs;
 TypeAbstraction lhsType = L.getType();
origin: com.ibm.wala/com.ibm.wala.core

 if (doPrimitives && lhs.getType() == TypeAbstraction.TOP) {
  lhs.setType(PrimitiveType.getPrimitive(elementType));
  return CHANGED;
if (lhs.getType() != TypeAbstraction.TOP) {
 TypeReference tType = null;
 if (lhs.getType() instanceof PointType) {
  tType = ((PointType) lhs.getType()).getType().getReference();
 } else if (lhs.getType() instanceof ConeType) {
  tType = ((ConeType) lhs.getType()).getType().getReference();
 } else {
  Assertions.UNREACHABLE("Unexpected type " + lhs.getType().getClass());
origin: com.ibm.wala/com.ibm.wala.dalvik

@Override
public byte evaluate(TypeVariable _lhs, TypeVariable[] _rhs) {
  /**
   * TODO: Find a better solution than downcasting. Downcasting is
   * really ugly, although I can be sure here that it succeeds because
   * I control what type the parameters have. There must be a cleaner
   * solution which does not cause tons of changes in WALA's code, but
   * I don't see it yet...
   */
  assert _lhs instanceof DalvikTypeVariable;
  assert _rhs instanceof DalvikTypeVariable[];
  DalvikTypeVariable lhs = (DalvikTypeVariable) _lhs;
  DalvikTypeVariable[] rhs = (DalvikTypeVariable[]) _rhs;
  TypeAbstraction lhsType = lhs.getType();
  TypeAbstraction meet = TypeAbstraction.TOP;
  boolean ignoreZero = containsNonPrimitiveAndZero(rhs);
  for (int i = 0; i < rhs.length; i++) {
    if (rhs[i] != null && rhs[i].getType() != null && !(ignoreZero && rhs[i].isIntZeroConstant())) {
      TypeVariable r = rhs[i];
      meet = meet.meet(r.getType());
    }
  }
  if (lhsType.equals(meet)) {
    return NOT_CHANGED;
  } else {
    lhs.setType(meet);
    return CHANGED;
  }
}
origin: wala/WALA

@Override
public byte evaluate(TypeVariable _lhs, TypeVariable[] _rhs) {
  /**
   * TODO: Find a better solution than downcasting. Downcasting is
   * really ugly, although I can be sure here that it succeeds because
   * I control what type the parameters have. There must be a cleaner
   * solution which does not cause tons of changes in WALA's code, but
   * I don't see it yet...
   */
  assert _lhs instanceof DalvikTypeVariable;
  assert _rhs instanceof DalvikTypeVariable[];
  DalvikTypeVariable lhs = (DalvikTypeVariable) _lhs;
  DalvikTypeVariable[] rhs = (DalvikTypeVariable[]) _rhs;
  TypeAbstraction lhsType = lhs.getType();
  TypeAbstraction meet = TypeAbstraction.TOP;
  boolean ignoreZero = containsNonPrimitiveAndZero(rhs);
  for (int i = 0; i < rhs.length; i++) {
    if (rhs[i] != null && rhs[i].getType() != null && !(ignoreZero && rhs[i].isIntZeroConstant())) {
      TypeVariable r = rhs[i];
      meet = meet.meet(r.getType());
    }
  }
  if (lhsType.equals(meet)) {
    return NOT_CHANGED;
  } else {
    lhs.setType(meet);
    return CHANGED;
  }
}
origin: wala/WALA

klass = cha.lookupClass(t);
if (klass != null) {
 v.setType(v.getType().meet(new PointType(klass)));
  IClass tc = cha.lookupClass(tx);
  if (tc != null) {
   v.setType(v.getType().meet(new ConeType(tc)));
origin: com.ibm.wala/com.ibm.wala.core

klass = cha.lookupClass(t);
if (klass != null) {
 v.setType(v.getType().meet(new PointType(klass)));
  IClass tc = cha.lookupClass(tx);
  if (tc != null) {
   v.setType(v.getType().meet(new ConeType(tc)));
com.ibm.wala.analysis.typeInferenceTypeVariablegetType

Popular methods of TypeVariable

  • <init>
  • setType

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • setContentView (Activity)
  • getApplicationContext (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now