/** * Sets the creator of this object value and adds this to the newCreator parsed as argument * * @param newCreator * The creator of this object value */ private synchronized void setCreator(ObjectValue newCreator) { // Do not set the creator if created by the system class. The System contains // fields with references to Thread instances which are not Serializable and // will fail a deep copy with a NotSerializableExpection for Thread if (newCreator != null && newCreator.type.getClassdef() instanceof ASystemClassDefinition) { return; } // establish transitive reference newCreator.addChild(this); }
public boolean hasDelegate(Context ctxt) { if (ctxt.assistantFactory.createSClassDefinitionAssistant().hasDelegate(type.getClassdef())) { if (delegateObject == null) { delegateObject = ctxt.assistantFactory.createSClassDefinitionAssistant().newInstance(type.getClassdef()); } return true; } return false; }
public boolean hasSupertype(AClassType cto, PType other) { return af.createPDefinitionAssistant().hasSupertype(cto.getClassdef(), other); }
public PDefinition findName(AClassType cls, ILexNameToken tag, NameScope scope) { return af.createPDefinitionAssistant().findName(cls.getClassdef(), tag, scope); }
@Override public String caseAClassType(AClassType type) throws AnalysisException { return type.getClassdef().getName().getName(); }
public Value invokeDelegate(Context ctxt) { return ctxt.assistantFactory.createSClassDefinitionAssistant().invokeDelegate(type.getClassdef(), delegateObject, ctxt); }
public boolean hasSupertype(AClassType sclass, PType other) { return af.createSClassDefinitionAssistant().hasSupertype(sclass.getClassdef(), other); }
/** * Called by the {@link AClassType} node from {@link AClassType#apply(IPOFAnalysis)}. * @param node the calling {@link AClassType} node */ public void caseAClassType(AClassType node) throws AnalysisException { _visitedNodes.add(node); inAClassType(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getName() != null ) { node.getName().apply(this); } if(node.getClassdef() != null && !_visitedNodes.contains(node.getClassdef())) { node.getClassdef().apply(this); } outAClassType(node); }
/** * Called by the {@link AClassType} node from {@link AClassType#apply(IAnalysis)}. * @param node the calling {@link AClassType} node */ public void caseAClassType(AClassType node) throws AnalysisException { _visitedNodes.add(node); inAClassType(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getName() != null ) { node.getName().apply(this); } if(node.getClassdef() != null && !_visitedNodes.contains(node.getClassdef())) { node.getClassdef().apply(this); } outAClassType(node); }
/** * Called by the {@link AClassType} node from {@link AClassType#apply(IAnalysis)}. * @param node the calling {@link AClassType} node */ public void caseAClassType(AClassType node, Q question) throws AnalysisException { _visitedNodes.add(node); inAClassType(node, question); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } if(node.getName() != null ) { node.getName().apply(this, question); } if(node.getClassdef() != null && !_visitedNodes.contains(node.getClassdef())) { node.getClassdef().apply(this, question); } outAClassType(node, question); }
public OperationValue getThreadOperation(Context ctxt) throws ValueException { return get(type.getClassdef().getName().getThreadName(), false).operationValue(ctxt); }
@Override public STypeIR caseAClassType(AClassType node, IRInfo question) throws AnalysisException { String typeName = node.getClassdef().getName().getName(); AClassTypeIR classType = new AClassTypeIR(); classType.setName(typeName); return classType; }
/** * Called by the {@link AClassType} node from {@link AClassType#apply(IAnalysis)}. * @param node the calling {@link AClassType} node */ public A caseAClassType(AClassType node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAClassType(node)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } if(node.getName() != null ) { mergeReturns(retVal,node.getName().apply(this)); } if(node.getClassdef() != null && !_visitedNodes.contains(node.getClassdef())) { mergeReturns(retVal,node.getClassdef().apply(this)); } mergeReturns(retVal,outAClassType(node)); return retVal; }
/** * Called by the {@link AClassType} node from {@link AClassType#apply(IAnalysis)}. * @param node the calling {@link AClassType} node */ public A caseAClassType(AClassType node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAClassType(node, question)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } if(node.getName() != null ) { mergeReturns(retVal,node.getName().apply(this, question)); } if(node.getClassdef() != null && !_visitedNodes.contains(node.getClassdef())) { mergeReturns(retVal,node.getClassdef().apply(this, question)); } mergeReturns(retVal,outAClassType(node, question)); return retVal; }
@Override public void caseAClassType(AClassType type) throws AnalysisException { if (type.getResolved()) { type.setResolved(false); for (PDefinition d : type.getClassdef().getDefinitions()) { // PTypeAssistantTC.unResolve(af.createPDefinitionAssistant().getType(d)); af.createPTypeAssistant().unResolve(af.createPDefinitionAssistant().getType(d)); } } }
@Override protected void body() { RootContext global = ClassInterpreter.getInstance().initialContext; ILexLocation from = self.type.getClassdef().getLocation(); Context ctxt = new ObjectContext(global.assistantFactory, from, "async", global, self); if (Settings.usingDBGP) { DBGPReader reader = ctxt.threadState.dbgp.newThread(cpu); ctxt.setThreadState(reader, cpu); runDBGP(ctxt); } else { ctxt.setThreadState(null, cpu); runCmd(ctxt); } }
SClassDefinition classdef = pattype.getClassdef(); PDefinitionAssistantTC definitionAssistant = af.createPDefinitionAssistant();
@Override protected void body() { RootContext global = ClassInterpreter.getInstance().initialContext; ILexLocation from = object.type.getClassdef().getLocation(); Context ctxt = new ObjectContext(global.assistantFactory, from, "async", global, object); if (Settings.usingDBGP) { DBGPReader reader = ctxt.threadState.dbgp.newThread(object.getCPU()); ctxt.setThreadState(reader, object.getCPU()); } else { ctxt.setThreadState(null, object.getCPU()); } new PeriodicThread(getObject(), operation, period, jitter, delay, 0, nextTime(), sporadic).start(); if (Settings.usingDBGP) { runDBGP(ctxt); } else { runCmd(ctxt); } }
if (question.assistantFactory.createSClassDefinitionAssistant().findThread(ctype.getClassdef()) == null) if (question.assistantFactory.createSClassDefinitionAssistant().findThread(ctype.getClassdef()) == null)
if (question.assistantFactory.createSClassDefinitionAssistant().findThread(ctype.getClassdef()) == null) if (question.assistantFactory.createSClassDefinitionAssistant().findThread(ctype.getClassdef()) == null)