Codota Logo
TypeInference.getVariable
Code IndexAdd Codota to your IDE (free)

How to use
getVariable
method
in
com.ibm.wala.analysis.typeInference.TypeInference

Best Java code snippets using com.ibm.wala.analysis.typeInference.TypeInference.getVariable (Showing top 8 results out of 315)

  • Common ways to obtain TypeInference
private void myMethod () {
TypeInference t =
  • Codota IconInference.TypeInference TypeInference;IR ir;TypeInference.make(ir, false)
  • Smart code suggestions by Codota
}
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

/**
 * 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: 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

TypeVariable v = getVariable(parameterValueNumbers[i]);
TypeReference t = ir.getParameterType(i);
for (int i = 0; i <= st.getMaxValueNumber(); i++) {
 if (st.isConstant(i)) {
  TypeVariable v = getVariable(i);
  v.setType(getConstantType(i));
if (s instanceof SSAAbstractInvokeInstruction) {
 SSAAbstractInvokeInstruction call = (SSAAbstractInvokeInstruction) s;
 TypeVariable v = getVariable(call.getException());
 Collection<TypeReference> defaultExceptions = call.getExceptionTypes();
 if (defaultExceptions.size() == 0) {
origin: com.ibm.wala/com.ibm.wala.core

TypeVariable v = getVariable(parameterValueNumbers[i]);
TypeReference t = ir.getParameterType(i);
for (int i = 0; i <= st.getMaxValueNumber(); i++) {
 if (st.isConstant(i)) {
  TypeVariable v = getVariable(i);
  v.setType(getConstantType(i));
if (s instanceof SSAAbstractInvokeInstruction) {
 SSAAbstractInvokeInstruction call = (SSAAbstractInvokeInstruction) s;
 TypeVariable v = getVariable(call.getException());
 Collection<TypeReference> defaultExceptions = call.getExceptionTypes();
 if (defaultExceptions.size() == 0) {
com.ibm.wala.analysis.typeInferenceTypeInferencegetVariable

Popular methods of TypeInference

  • getType
    Return the type computed for a particular value number
  • make
  • <init>
  • addAllStatementsToWorkList
  • getConstantPrimitiveType
  • getConstantType
  • init
  • initialize
  • solve

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • putExtra (Intent)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Notification (javax.management)
  • JLabel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
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