Codota Logo
PointType
Code IndexAdd Codota to your IDE (free)

How to use
PointType
in
com.ibm.wala.analysis.typeInference

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: wala/WALA

public JSTypeInference(IR ir, IClassHierarchy cha) {
 super(ir, new PointType(cha.lookupClass(JavaScriptTypes.Boolean)), true);
}
origin: wala/WALA

@Override
public ContextItem get(ContextKey name) {
 if (name == ContextKey.RECEIVER) {
  return type;
 } else if (name == ContextKey.PARAMETERS[0]) {
  if (type instanceof PointType) {
   IClass cls = ((PointType) type).getIClass();
   return new FilteredPointerKey.SingleClassFilter(cls);
  } else {
   return null;
  }
 } else {
  return null;
 }
}
origin: wala/WALA

public boolean isArrayType() {
 return getType().isArrayClass();
}
origin: com.ibm.wala/com.ibm.wala.cast.js

public JSTypeInference(IR ir, IClassHierarchy cha) {
 super(ir, new PointType(cha.lookupClass(JavaScriptTypes.Boolean)), true);
}
origin: com.ibm.wala/com.ibm.wala.core

public boolean isArrayType() {
 return getType().isArrayClass();
}
origin: com.ibm.wala/com.ibm.wala.core

@Override
public ContextItem get(ContextKey name) {
 if (name == ContextKey.RECEIVER) {
  return type;
 } else if (name == ContextKey.PARAMETERS[0]) {
  if (type instanceof PointType) {
   IClass cls = ((PointType) type).getIClass();
   return new FilteredPointerKey.SingleClassFilter(cls);
  } else {
   return null;
  }
 } else {
  return null;
 }
}
origin: com.ibm.wala/com.ibm.wala.core

/**
 * If the {@link CallSiteReference} invokes a method we understand and c is a type constant, return a {@link JavaTypeContext}
 * representing the type named by s, if we can resolve it in the {@link IClassHierarchy}.
 */
@Override
public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver) {
 if (receiver != null && receiver.length > 0 && mayUnderstand(callee, receiver[0])) {
  return new JavaTypeContext(new PointType(getTypeConstant(receiver[0])));
 }
 return null;
}
origin: wala/WALA

public SetType(PointType[] points) {
 if (points == null) {
  throw new IllegalArgumentException("points is null");
 }
 if (points.length == 0) {
  throw new IllegalArgumentException("points.length == 0");
 }
 types = HashSetFactory.make(points.length);
 int h = 0;
 for (int i = 0; i < points.length; i++) {
  if (points[i] == null) {
   throw new IllegalArgumentException("points[" + i + "] is null");
  }
  TypeReference T = points[i].getType().getReference();
  h ^= T.hashCode();
  types.add(T);
 }
 hashCode = h;
}
origin: wala/WALA

/**
 * @param c a context
 * @return If this is an object-sensitive context that identifies a unique class for the receiver object, then return the unique
 *         class. Else, return null.
 * @throws IllegalArgumentException if c is null
 */
public static IClass getConcreteClassFromContext(Context c) {
 if (c == null) {
  throw new IllegalArgumentException("c is null");
 }
 ContextItem item = c.get(ContextKey.RECEIVER);
 if (item == null) {
  return null;
 } else {
  if (item instanceof PointType) {
   return ((PointType) item).getIClass();
  } else if (item instanceof InstanceKey) {
   return ((InstanceKey) item).getConcreteType();
  } else {
   Assertions.UNREACHABLE("Unexpected: " + item.getClass());
   return null;
  }
 }
}
origin: wala/WALA

/**
 * If the {@link CallSiteReference} invokes a method we understand and c is a type constant, return a {@link JavaTypeContext}
 * representing the type named by s, if we can resolve it in the {@link IClassHierarchy}.
 */
@Override
public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver) {
 if (receiver != null && receiver.length > 0 && mayUnderstand(callee, receiver[0])) {
  return new JavaTypeContext(new PointType(getTypeConstant(receiver[0])));
 }
 return null;
}
origin: com.ibm.wala/com.ibm.wala.core

public SetType(PointType[] points) {
 if (points == null) {
  throw new IllegalArgumentException("points is null");
 }
 if (points.length == 0) {
  throw new IllegalArgumentException("points.length == 0");
 }
 types = HashSetFactory.make(points.length);
 int h = 0;
 for (int i = 0; i < points.length; i++) {
  if (points[i] == null) {
   throw new IllegalArgumentException("points[" + i + "] is null");
  }
  TypeReference T = points[i].getType().getReference();
  h ^= T.hashCode();
  types.add(T);
 }
 hashCode = h;
}
origin: com.ibm.wala/com.ibm.wala.core

/**
 * @param c a context
 * @return If this is an object-sensitive context that identifies a unique class for the receiver object, then return the unique
 *         class. Else, return null.
 * @throws IllegalArgumentException if c is null
 */
public static IClass getConcreteClassFromContext(Context c) {
 if (c == null) {
  throw new IllegalArgumentException("c is null");
 }
 ContextItem item = c.get(ContextKey.RECEIVER);
 if (item == null) {
  return null;
 } else {
  if (item instanceof PointType) {
   return ((PointType) item).getIClass();
  } else if (item instanceof InstanceKey) {
   return ((InstanceKey) item).getConcreteType();
  } else {
   Assertions.UNREACHABLE("Unexpected: " + item.getClass());
   return null;
  }
 }
}
origin: com.ibm.wala/com.ibm.wala.core

public TypeAbstraction getTypeForNewInstance(int bcIndex, IClassHierarchy cha) {
 if (cha == null) {
  throw new IllegalArgumentException("null cha");
 }
 Set<TypeReference> S = map.get(Integer.valueOf(bcIndex));
 if (S == null) {
  return null;
 } else {
  PointType[] p = new PointType[S.size()];
  Iterator<TypeReference> it = S.iterator();
  for (int i = 0; i < p.length; i++) {
   TypeReference T = it.next();
   IClass klass = cha.lookupClass(T);
   assert klass != null : "null type for " + T;
   p[i] = new PointType(klass);
  }
  return new SetType(p);
 }
}
origin: com.ibm.wala/com.ibm.wala.core

 return other.meet(new ConeType(this.getType()));
} else {
 Assertions.UNREACHABLE("Unexpected type: " + rhs.getClass());
origin: wala/WALA

@Override
public ContextItem get(ContextKey name) {
 
 if (name == ContextKey.RECEIVER) {
  return type;
 } else if (name == ContextKey.NAME) {
  return new NameItem();
 } else if (name == ContextKey.PARAMETERS[0]) {
  if (type instanceof PointType) {
   IClass cls = ((PointType) type).getIClass();
   return new FilteredPointerKey.SingleClassFilter(cls);
  } else {
   return null;
  }
 } else if (name == ContextKey.PARAMETERS[1]) {
   return new FilteredPointerKey.SingleClassFilter(this.name.getConcreteType());
 } else {
  return null;
 }
}
origin: wala/WALA

public TypeAbstraction getTypeForNewInstance(int bcIndex, IClassHierarchy cha) {
 if (cha == null) {
  throw new IllegalArgumentException("null cha");
 }
 Set<TypeReference> S = map.get(Integer.valueOf(bcIndex));
 if (S == null) {
  return null;
 } else {
  PointType[] p = new PointType[S.size()];
  Iterator<TypeReference> it = S.iterator();
  for (int i = 0; i < p.length; i++) {
   TypeReference T = it.next();
   IClass klass = cha.lookupClass(T);
   assert klass != null : "null type for " + T;
   p[i] = new PointType(klass);
  }
  return new SetType(p);
 }
}
origin: com.ibm.wala/com.ibm.wala.core

 elementType = ((PointType) arrayType).getType().getReference().getArrayElementType();
} else if (arrayType instanceof ConeType) {
 elementType = ((ConeType) arrayType).getType().getReference().getArrayElementType();
 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();
origin: com.ibm.wala/com.ibm.wala.core

@Override
public ContextItem get(ContextKey name) {
 
 if (name == ContextKey.RECEIVER) {
  return type;
 } else if (name == ContextKey.NAME) {
  return new NameItem();
 } else if (name == ContextKey.PARAMETERS[0]) {
  if (type instanceof PointType) {
   IClass cls = ((PointType) type).getIClass();
   return new FilteredPointerKey.SingleClassFilter(cls);
  } else {
   return null;
  }
 } else if (name == ContextKey.PARAMETERS[1]) {
   return new FilteredPointerKey.SingleClassFilter(this.name.getConcreteType());
 } else {
  return null;
 }
}
origin: wala/WALA

@Override
public void visitNew(SSANewInstruction instruction) {
 TypeReference type = instruction.getConcreteType();
 IClass klass = cha.lookupClass(type);
 if (klass == null) {
  // a type that cannot be loaded.
  // be pessimistic
  result = new DeclaredTypeOperator(BOTTOM);
 } else {
  result = new DeclaredTypeOperator(new PointType(klass));
 }
}
origin: wala/WALA

 return other.meet(new ConeType(this.getType()));
} else {
 Assertions.UNREACHABLE("Unexpected type: " + rhs.getClass());
com.ibm.wala.analysis.typeInferencePointType

Javadoc

Represents a single concrete type.

Most used methods

  • <init>
  • getIClass
  • getType

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • onCreateOptionsMenu (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Runner (org.openjdk.jmh.runner)
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