Tabnine Logo
IField.getDeclaringClass
Code IndexAdd Tabnine to your IDE (free)

How to use
getDeclaringClass
method
in
com.ibm.wala.classLoader.IField

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

origin: wala/WALA

@Override
public boolean shouldRefine(IField field, PointerKey basePtr, PointerKey val, IFlowLabel label, StateMachine.State state) {
 if (field == null) {
  throw new IllegalArgumentException("null field");
 }
 if (field == ArrayContents.v()) {
  return true;
 } else {
  final IClass declaringClass = field.getDeclaringClass();
  final Matcher m = refinePattern.matcher(declaringClass.toString());
  final boolean foundPattern = m.find();
  recordDecision(declaringClass, foundPattern);
  return foundPattern;
 }
}
origin: com.ibm.wala/com.ibm.wala.core

@Override
public boolean shouldRefine(IField field, PointerKey basePtr, PointerKey val, IFlowLabel label, StateMachine.State state) {
 if (field == null) {
  throw new IllegalArgumentException("null field");
 }
 if (field == ArrayContents.v()) {
  return true;
 } else {
  final IClass declaringClass = field.getDeclaringClass();
  final Matcher m = refinePattern.matcher(declaringClass.toString());
  final boolean foundPattern = m.find();
  recordDecision(declaringClass, foundPattern);
  return foundPattern;
 }
}
origin: wala/WALA

@Override
public String descString() {
  return field.getDeclaringClass().toString() + '.' + field.getName().toString();
}

origin: wala/WALA

@Override
public String descString() {
  return field.getDeclaringClass().toString() + '.' + field.getName().toString();
}

origin: com.ibm.wala/com.ibm.wala.core

private static void verboseAction(PointerKey p) {
 if (p instanceof AbstractFieldPointerKey) {
  AbstractFieldPointerKey f = (AbstractFieldPointerKey) p;
  if (f.getInstanceKey().getConcreteType() != null) {
   TypeReference t = f.getInstanceKey().getConcreteType().getReference();
   if (!considered.contains(t)) {
    considered.add(t);
    System.err.println("Considered " + t);
   }
  }
 } else if (p instanceof StaticFieldKey) {
  StaticFieldKey sf = (StaticFieldKey) p;
  TypeReference t = sf.getField().getDeclaringClass().getReference();
  if (!considered.contains(t)) {
   considered.add(t);
   System.err.println("Considered " + t);
  }
 }
}
origin: com.ibm.wala/com.ibm.wala.core

@Override
public boolean shouldRefine(IField field, PointerKey basePtr, PointerKey val, IFlowLabel label, StateMachine.State state) {
 if (field == null) {
  throw new IllegalArgumentException("null field");
 }
 if (field == ArrayContents.v()) {
  return true;
 }
 IClass classToCheck = removeInner(field.getDeclaringClass());
 if (superOfAnyEncountered(classToCheck)) {
  return true;
 } else {
  if (firstSkippedClass == null) {
   firstSkippedClass = classToCheck;
  }
  return false;
 }
}
origin: wala/WALA

@Override
public boolean shouldRefine(IField field, PointerKey basePtr, PointerKey val, IFlowLabel label, StateMachine.State state) {
 if (field == null) {
  throw new IllegalArgumentException("null field");
 }
 if (field == ArrayContents.v()) {
  return true;
 }
 IClass classToCheck = removeInner(field.getDeclaringClass());
 if (superOfAnyEncountered(classToCheck)) {
  return true;
 } else {
  if (firstSkippedClass == null) {
   firstSkippedClass = classToCheck;
  }
  return false;
 }
}
origin: wala/WALA

IField field = cg.getClassHierarchy().resolveField(fref);
if(field != null) {
  IClass cls = field.getDeclaringClass();
  if(cls != null) {
    if (!refs.get(cgNode).containsKey(cls)) {
IField field = cg.getClassHierarchy().resolveField(fput);
if(field != null) {
  IClass cls = field.getDeclaringClass();
  if(cls != null) {
    if (!mods.get(cgNode).containsKey(cls)) {
origin: wala/WALA

private static void verboseAction(PointerKey p) {
 if (p instanceof AbstractFieldPointerKey) {
  AbstractFieldPointerKey f = (AbstractFieldPointerKey) p;
  if (f.getInstanceKey().getConcreteType() != null) {
   TypeReference t = f.getInstanceKey().getConcreteType().getReference();
   if (!considered.contains(t)) {
    considered.add(t);
    System.err.println("Considered " + t);
   }
  }
 } else if (p instanceof StaticFieldKey) {
  StaticFieldKey sf = (StaticFieldKey) p;
  TypeReference t = sf.getField().getDeclaringClass().getReference();
  if (!considered.contains(t)) {
   considered.add(t);
   System.err.println("Considered " + t);
  }
 }
}
origin: com.ibm.wala/com.ibm.wala.core

IField field = cg.getClassHierarchy().resolveField(fref);
if(field != null) {
  IClass cls = field.getDeclaringClass();
  if(cls != null) {
    if (!refs.get(cgNode).containsKey(cls)) {
IField field = cg.getClassHierarchy().resolveField(fput);
if(field != null) {
  IClass cls = field.getDeclaringClass();
  if(cls != null) {
    if (!mods.get(cgNode).containsKey(cls)) {
origin: wala/WALA

/**
 * @return the PointerKey that acts as a representation for the class of pointers that includes the given instance field. null if
 *         there's some problem.
 * @throws IllegalArgumentException if I is null
 * @throws IllegalArgumentException if field is null
 */
public PointerKey getPointerKeyForInstanceField(InstanceKey I, IField field) {
 if (field == null) {
  throw new IllegalArgumentException("field is null");
 }
 if (I == null) {
  throw new IllegalArgumentException("I is null");
 }
 IClass t = field.getDeclaringClass();
 IClass C = I.getConcreteType();
 if (!(C instanceof SyntheticClass)) {
  if (!getClassHierarchy().isSubclassOf(C, t)) {
   return null;
  }
 }
 return pointerKeyFactory.getPointerKeyForInstanceField(I, field);
}
origin: com.ibm.wala/com.ibm.wala.core

/**
 * @return the PointerKey that acts as a representation for the class of pointers that includes the given instance field. null if
 *         there's some problem.
 * @throws IllegalArgumentException if I is null
 * @throws IllegalArgumentException if field is null
 */
public PointerKey getPointerKeyForInstanceField(InstanceKey I, IField field) {
 if (field == null) {
  throw new IllegalArgumentException("field is null");
 }
 if (I == null) {
  throw new IllegalArgumentException("I is null");
 }
 IClass t = field.getDeclaringClass();
 IClass C = I.getConcreteType();
 if (!(C instanceof SyntheticClass)) {
  if (!getClassHierarchy().isSubclassOf(C, t)) {
   return null;
  }
 }
 return pointerKeyFactory.getPointerKeyForInstanceField(I, field);
}
origin: wala/WALA

private int compareStaticKey(StaticFieldKey key1, Object key2) {
 if (key2 instanceof StaticFieldKey) {
  int n1 = cha.getNumber( key1.getField().getDeclaringClass() );
  int n2 = cha.getNumber( ((StaticFieldKey)key2).getField().getDeclaringClass() );
  if (n1 != n2)
 return n1-n2;
  else {
 return compareFields(key1.getField(), ((StaticFieldKey)key2).getField());
  }
 }
 
 else
 return -1;
}
origin: com.ibm.wala/com.ibm.wala.core

private int compareStaticKey(StaticFieldKey key1, Object key2) {
 if (key2 instanceof StaticFieldKey) {
  int n1 = cha.getNumber( key1.getField().getDeclaringClass() );
  int n2 = cha.getNumber( ((StaticFieldKey)key2).getField().getDeclaringClass() );
  if (n1 != n2)
 return n1-n2;
  else {
 return compareFields(key1.getField(), ((StaticFieldKey)key2).getField());
  }
 }
 
 else
 return -1;
}
origin: com.ibm.wala/com.ibm.wala.core

IField field = cg.getClassHierarchy().resolveField(fref);
if(field != null) {
  IClass cls = field.getDeclaringClass();
  if(cls != null) {
    if (!trefs.get(node).containsKey(cls)) {
IField field = cg.getClassHierarchy().resolveField(fput);
if(field != null) {
  IClass cls = field.getDeclaringClass();
  if(cls != null) {
    if (!tmods.get(node).containsKey(cls)) {
origin: wala/WALA

if (!set.contains(sf.getField().getDeclaringClass().getReference().getName().toString().substring(1))) {
 result.add(p);
 if (VERBOSE) {
origin: com.ibm.wala/com.ibm.wala.core

if (!set.contains(sf.getField().getDeclaringClass().getReference().getName().toString().substring(1))) {
 result.add(p);
 if (VERBOSE) {
origin: com.ibm.wala/com.ibm.wala.core

 public static TypeReference getType(PointerKey pk) {
  if (pk instanceof AbstractFieldPointerKey) {
   AbstractFieldPointerKey f = (AbstractFieldPointerKey) pk;
   if (f.getInstanceKey().getConcreteType() != null) {
    return f.getInstanceKey().getConcreteType().getReference();
   }
  } else if (pk instanceof StaticFieldKey) {
   StaticFieldKey sf = (StaticFieldKey) pk;
   return sf.getField().getDeclaringClass().getReference();
  }
  return null;
 }
}
origin: wala/WALA

 public static TypeReference getType(PointerKey pk) {
  if (pk instanceof AbstractFieldPointerKey) {
   AbstractFieldPointerKey f = (AbstractFieldPointerKey) pk;
   if (f.getInstanceKey().getConcreteType() != null) {
    return f.getInstanceKey().getConcreteType().getReference();
   }
  } else if (pk instanceof StaticFieldKey) {
   StaticFieldKey sf = (StaticFieldKey) pk;
   return sf.getField().getDeclaringClass().getReference();
  }
  return null;
 }
}
origin: wala/WALA

private Set<CodeElement> getFieldAccessCodeElts(CGNode node,
    SSAFieldAccessInstruction inst) {
  if (inst.isStatic()) {
    return getStaticFieldAccessCodeElts(inst);
  }
  Set<CodeElement> elts = HashSetFactory.make();
  final FieldReference fieldRef = inst.getDeclaredField();
  final IField field = node.getClassHierarchy().resolveField(fieldRef);
  PointerKey pk = pa.getHeapModel().getPointerKeyForLocal(node,
      inst.getRef());
  final OrdinalSet<InstanceKey> pointsToSet = pa.getPointsToSet(pk);
  if (pointsToSet.isEmpty()) {
    InstanceKey ik = new ConcreteTypeKey(field.getDeclaringClass());
    elts.add(new FieldElement(ik, fieldRef));
    elts.add(new InstanceKeyElement(ik));
  } else {
    for (InstanceKey ik : pointsToSet) {
      elts.add(new FieldElement(ik, fieldRef));
      elts.add(new InstanceKeyElement(ik));
    }
  }
  return elts;
}
com.ibm.wala.classLoaderIFieldgetDeclaringClass

Popular methods of IField

  • getFieldTypeReference
  • getReference
  • isStatic
  • getName
  • isFinal
    Is this field final?
  • getAnnotations
  • isVolatile
    Is this member volatile?

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Kernel (java.awt.image)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • CodeWhisperer alternatives
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