Tabnine Logo
NewSiteReference.make
Code IndexAdd Tabnine to your IDE (free)

How to use
make
method
in
com.ibm.wala.classLoader.NewSiteReference

Best Java code snippets using com.ibm.wala.classLoader.NewSiteReference.make (Showing top 20 results out of 315)

origin: wala/WALA

@Override
public Iterator<Pair<CGNode, NewSiteReference>> getCreationSites(CallGraph CG) {
 CGNode cgn = CG.getNode(node, Everywhere.EVERYWHERE);
 assert cgn != null : node;     
 return NonNullSingletonIterator.make(Pair.make(cgn, NewSiteReference.make(instructionIndex, createdType)));
}
origin: wala/WALA

@Override
public void visitNew(NewInstruction instruction) {
 ClassLoaderReference loader = getReference().getDeclaringClass().getClassLoader();
 TypeReference t = ShrikeUtil.makeTypeReference(loader, instruction.getType());
 newSites.add(NewSiteReference.make(getProgramCounter(), t));
}
origin: wala/WALA

@Override
public Iterator<NewSiteReference> iterateNewSites(CGNode node) {
 if (node == null) {
  throw new IllegalArgumentException("node is null");
 }
 assert understands(node);
 TypeReference tr = ((TypeAbstraction)node.getContext().get(ContextKey.RECEIVER)).getTypeReference();
 if (tr != null) {
  return new NonNullSingletonIterator<>(NewSiteReference.make(0, tr));
 }
 return EmptyIterator.instance();
}
origin: com.ibm.wala/com.ibm.wala.core

@Override
public Iterator<NewSiteReference> iterateNewSites(CGNode node) {
 if (node == null) {
  throw new IllegalArgumentException("node is null");
 }
 assert understands(node);
 TypeReference tr = ((TypeAbstraction)node.getContext().get(ContextKey.RECEIVER)).getTypeReference();
 if (tr != null) {
  return new NonNullSingletonIterator<>(NewSiteReference.make(0, tr));
 }
 return EmptyIterator.instance();
}
origin: com.ibm.wala/com.ibm.wala.core

@Override
public void visitNew(NewInstruction instruction) {
 ClassLoaderReference loader = getReference().getDeclaringClass().getClassLoader();
 TypeReference t = ShrikeUtil.makeTypeReference(loader, instruction.getType());
 newSites.add(NewSiteReference.make(getProgramCounter(), t));
}
origin: wala/WALA

@Override
public Iterator<NewSiteReference> iterateNewSites(CGNode node) {
 if (node == null) {
  throw new IllegalArgumentException("node is null");
 }
 assert understands(node);
 Context context = node.getContext();
 TypeReference tr = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getTypeReference();
 if (tr != null) {
  return new NonNullSingletonIterator<>(NewSiteReference.make(0, tr));
 }
 return EmptyIterator.instance();
}
origin: wala/WALA

@Override
public Iterator<NewSiteReference> iterateNewSites(CGNode node) {
 if (node == null) {
  throw new IllegalArgumentException("node is null");
 }
 assert understands(node);
 Context context = node.getContext();
 TypeReference tr = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getTypeReference();
 if (tr != null) {
  return new NonNullSingletonIterator<>(NewSiteReference.make(0, tr));
 }
 return EmptyIterator.instance();
}
origin: com.ibm.wala/com.ibm.wala.core

@Override
public Iterator<NewSiteReference> iterateNewSites(CGNode node) {
 if (node == null) {
  throw new IllegalArgumentException("node is null");
 }
 assert understands(node);
 Context context = node.getContext();
 TypeReference tr = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getTypeReference();
 if (tr != null) {
  return new NonNullSingletonIterator<>(NewSiteReference.make(0, tr));
 }
 return EmptyIterator.instance();
}
origin: com.ibm.wala/com.ibm.wala.cast

@Override
public SSANewInstruction addAllocation(TypeReference T) {
 if (cha.isSubclassOf(cha.lookupClass(T), cha.lookupClass(declaringClass.getClassLoader().getLanguage().getRootType()))) {
  int instance = nextLocal++;
  NewSiteReference ref = NewSiteReference.make(statements.size(), T);
  SSANewInstruction result = getDeclaringClass().getClassLoader().getInstructionFactory().NewInstruction(statements.size(), instance, ref);
  statements.add(result);
  return result;
 } else {
  return super.addAllocation(T);
 }
}
origin: wala/WALA

public JavaScriptSummary(MethodReference ref, int declaredParameters) {
 super(ref);
 this.declaredParameters = declaredParameters;
 addStatement(
  JavaScriptLoader.JS.instructionFactory().NewInstruction(getNumberOfStatements(),
   declaredParameters+1,
 NewSiteReference.make(
    getNextProgramCounter(),
  JavaScriptTypes.Array)));
}
origin: com.ibm.wala/com.ibm.wala.cast.js

public JavaScriptSummary(MethodReference ref, int declaredParameters) {
 super(ref);
 this.declaredParameters = declaredParameters;
 addStatement(
  JavaScriptLoader.JS.instructionFactory().NewInstruction(getNumberOfStatements(),
   declaredParameters+1,
 NewSiteReference.make(
    getNextProgramCounter(),
  JavaScriptTypes.Array)));
}
origin: wala/WALA

@Override
public SSANewInstruction addAllocation(TypeReference T) {
 if (cha.isSubclassOf(cha.lookupClass(T), cha.lookupClass(declaringClass.getClassLoader().getLanguage().getRootType()))) {
  int instance = nextLocal++;
  NewSiteReference ref = NewSiteReference.make(statements.size(), T);
  SSANewInstruction result = getDeclaringClass().getClassLoader().getInstructionFactory().NewInstruction(statements.size(), instance, ref);
  statements.add(result);
  return result;
 } else {
  return super.addAllocation(T);
 }
}
origin: wala/WALA

/**
 *  Add a NewInstruction to the body.
 */
private SSANewInstruction addNew(SSAValue val) {
  final int pc = this.body.getNextProgramCounter();
  final NewSiteReference nRef = NewSiteReference.make(pc, val.getType());
  final SSANewInstruction newInstr = this.instructionFactory.NewInstruction(pc, val, nRef);
  this.body.addStatement(newInstr);
  assert(val.getNumber() == newInstr.getDef());
  return newInstr;
}
origin: wala/WALA

/**
 *  Add a NewInstruction to the body.
 */
private SSANewInstruction addNew(SSAValue val) {
  final int pc = this.body.getNextProgramCounter();
  final NewSiteReference nRef = NewSiteReference.make(pc, val.getType());
  final SSANewInstruction newInstr = this.instructionFactory.NewInstruction(pc, val, nRef);
  this.body.addStatement(newInstr);
  assert(val.getNumber() == newInstr.getDef());
  return newInstr;
}
origin: com.ibm.wala/com.ibm.wala.dalvik

/**
 *  Add a NewInstruction to the body.
 */
private SSANewInstruction addNew(SSAValue val) {
  final int pc = this.body.getNextProgramCounter();
  final NewSiteReference nRef = NewSiteReference.make(pc, val.getType());
  final SSANewInstruction newInstr = this.instructionFactory.NewInstruction(pc, val, nRef);
  this.body.addStatement(newInstr);
  assert(val.getNumber() == newInstr.getDef());
  return newInstr;
}
origin: com.ibm.wala/com.ibm.wala.dalvik

/**
 *  Add a NewInstruction to the body.
 */
private SSANewInstruction addNew(SSAValue val) {
  final int pc = this.body.getNextProgramCounter();
  final NewSiteReference nRef = NewSiteReference.make(pc, val.getType());
  final SSANewInstruction newInstr = this.instructionFactory.NewInstruction(pc, val, nRef);
  this.body.addStatement(newInstr);
  assert(val.getNumber() == newInstr.getDef());
  return newInstr;
}
origin: wala/WALA

@Override
protected void doNewObject(WalkContext context, CAstNode newNode, int result, Object type, int[] arguments) {
 assert arguments == null;
 TypeReference typeRef = TypeReference.findOrCreate(JavaScriptTypes.jsLoader, TypeName.string2TypeName("L" + type));
 context.cfg().addInstruction(insts.NewInstruction(context.cfg().getCurrentInstruction(), result, 
   NewSiteReference.make(context.cfg().getCurrentInstruction(), typeRef)));
}
origin: com.ibm.wala/com.ibm.wala.cast.js

@Override
protected void doNewObject(WalkContext context, CAstNode newNode, int result, Object type, int[] arguments) {
 assert arguments == null;
 TypeReference typeRef = TypeReference.findOrCreate(JavaScriptTypes.jsLoader, TypeName.string2TypeName("L" + type));
 context.cfg().addInstruction(insts.NewInstruction(context.cfg().getCurrentInstruction(), result, 
   NewSiteReference.make(context.cfg().getCurrentInstruction(), typeRef)));
}
origin: wala/WALA

@Override
protected void doNewObject(WalkContext context, CAstNode newNode, int result, Object type, int[] arguments) {
 TypeReference typeRef = (TypeReference) type;
 NewSiteReference site = NewSiteReference.make(context.cfg().getCurrentInstruction(), typeRef);
 if (newNode.getKind() == CAstNode.NEW_ENCLOSING) {
  context.cfg().addInstruction(new AstJavaNewEnclosingInstruction(context.cfg().getCurrentInstruction(), result, site, arguments[0]));
 } else {
  context.cfg().addInstruction(
    (arguments == null) ? insts.NewInstruction(context.cfg().getCurrentInstruction(), result, site) : insts.NewInstruction(context.cfg().getCurrentInstruction(), result, site, arguments));
 }
 processExceptions(newNode, context);
}
origin: com.ibm.wala/com.ibm.wala.cast.java

@Override
protected void doNewObject(WalkContext context, CAstNode newNode, int result, Object type, int[] arguments) {
 TypeReference typeRef = (TypeReference) type;
 NewSiteReference site = NewSiteReference.make(context.cfg().getCurrentInstruction(), typeRef);
 if (newNode.getKind() == CAstNode.NEW_ENCLOSING) {
  context.cfg().addInstruction(new AstJavaNewEnclosingInstruction(context.cfg().getCurrentInstruction(), result, site, arguments[0]));
 } else {
  context.cfg().addInstruction(
    (arguments == null) ? insts.NewInstruction(context.cfg().getCurrentInstruction(), result, site) : insts.NewInstruction(context.cfg().getCurrentInstruction(), result, site, arguments));
 }
 processExceptions(newNode, context);
}
com.ibm.wala.classLoaderNewSiteReferencemake

Popular methods of NewSiteReference

  • getDeclaredType
  • getProgramCounter
  • <init>
  • equals
  • hashCode

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • Kernel (java.awt.image)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now