@Override public Collection<CAstQualifier> getQualifiers() { return base.getQualifiers(); }
@Override public Collection<CAstQualifier> getQualifiers() { return base.getQualifiers(); }
private CAstEntity getEnclosingType(CAstEntity entity) { if (entity.getQualifiers().contains(CAstQualifier.STATIC)) return null; else return getEnclosingTypeInternal(getParent(entity)); }
private CAstEntity getEnclosingType(CAstEntity entity) { if (entity.getQualifiers().contains(CAstQualifier.STATIC)) return null; else return getEnclosingTypeInternal(getParent(entity)); }
public IClass defineType(CAstEntity type, String typeName, CAstEntity owner) { Collection<TypeName> superTypeNames = new ArrayList<>(); for (CAstType superType : type.getType().getSupertypes()) { superTypeNames.add(toWALATypeName(superType)); } JavaClass javaClass = new JavaClass(typeName, superTypeNames, type.getPosition(), type.getQualifiers(), this, (owner != null) ? (JavaClass) fTypeMap.get(owner) : (JavaClass) null, getAnnotations(type)); if (getParent().lookupClass(javaClass.getName()) != null) { return null; } fTypeMap.put(type, javaClass); loadedClasses.put(javaClass.getName(), javaClass); return javaClass; }
public IClass defineType(CAstEntity type, String typeName, CAstEntity owner) { Collection<TypeName> superTypeNames = new ArrayList<>(); for (CAstType superType : type.getType().getSupertypes()) { superTypeNames.add(toWALATypeName(superType)); } JavaClass javaClass = new JavaClass(typeName, superTypeNames, type.getPosition(), type.getQualifiers(), this, (owner != null) ? (JavaClass) fTypeMap.get(owner) : (JavaClass) null, getAnnotations(type)); if (getParent().lookupClass(javaClass.getName()) != null) { return null; } fTypeMap.put(type, javaClass); loadedClasses.put(javaClass.getName(), javaClass); return javaClass; }
private CAstEntity getEnclosingTypeInternal(CAstEntity entity) { switch (entity.getKind()) { case CAstEntity.TYPE_ENTITY: { return entity; } case CAstEntity.FUNCTION_ENTITY: { if (entity.getQualifiers().contains(CAstQualifier.STATIC)) return null; else return getEnclosingTypeInternal(getParent(entity)); } case CAstEntity.FILE_ENTITY: { return null; } default: { return getEnclosingTypeInternal(getParent(entity)); } } }
private CAstEntity getEnclosingTypeInternal(CAstEntity entity) { switch (entity.getKind()) { case CAstEntity.TYPE_ENTITY: { return entity; } case CAstEntity.FUNCTION_ENTITY: { if (entity.getQualifiers().contains(CAstQualifier.STATIC)) return null; else return getEnclosingTypeInternal(getParent(entity)); } case CAstEntity.FILE_ENTITY: { return null; } default: { return getEnclosingTypeInternal(getParent(entity)); } } }
public JavaEntityMethod(CAstEntity methodEntity, IClass owner) { super(owner, methodEntity.getQualifiers(), MethodReference.findOrCreate(owner.getReference(), Util .methodEntityToSelector(methodEntity)), JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); this.parameterTypes = computeParameterTypes(methodEntity); this.exceptionTypes = computeExceptionTypes(methodEntity); }
public JavaEntityMethod(CAstEntity methodEntity, IClass owner, AbstractCFG<?, ?> cfg, SymbolTable symtab, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) { super(owner, methodEntity.getQualifiers(), cfg, symtab, MethodReference.findOrCreate(owner.getReference(), Util .methodEntityToSelector(methodEntity)), hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo, JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); this.parameterTypes = computeParameterTypes(methodEntity); this.exceptionTypes = computeExceptionTypes(methodEntity); }
public JavaEntityMethod(CAstEntity methodEntity, IClass owner, AbstractCFG<?, ?> cfg, SymbolTable symtab, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) { super(owner, methodEntity.getQualifiers(), cfg, symtab, MethodReference.findOrCreate(owner.getReference(), Util .methodEntityToSelector(methodEntity)), hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo, JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); this.parameterTypes = computeParameterTypes(methodEntity); this.exceptionTypes = computeExceptionTypes(methodEntity); }
public JavaEntityMethod(CAstEntity methodEntity, IClass owner) { super(owner, methodEntity.getQualifiers(), MethodReference.findOrCreate(owner.getReference(), Util .methodEntityToSelector(methodEntity)), JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); this.parameterTypes = computeParameterTypes(methodEntity); this.exceptionTypes = computeExceptionTypes(methodEntity); }
@Override protected void declareFunction(CAstEntity N, WalkContext definingContext) { CAstType.Method methodType = (Method) N.getType(); CAstType owningType = methodType.getDeclaringType(); IClass owner = loader.lookupClass(makeType(owningType).getName()); assert owner != null || exclusions.contains(owningType.getName()) : makeType(owningType).getName().toString() + " not found in " + loader; if (owner != null && N.getQualifiers().contains(CAstQualifier.ABSTRACT)) { ((JavaSourceLoaderImpl) loader).defineAbstractFunction(N, owner); } }
@Override protected void declareFunction(CAstEntity N, WalkContext definingContext) { CAstType.Method methodType = (Method) N.getType(); CAstType owningType = methodType.getDeclaringType(); IClass owner = loader.lookupClass(makeType(owningType).getName()); assert owner != null || exclusions.contains(owningType.getName()) : makeType(owningType).getName().toString() + " not found in " + loader; if (owner != null && N.getQualifiers().contains(CAstQualifier.ABSTRACT)) { ((JavaSourceLoaderImpl) loader).defineAbstractFunction(N, owner); } }
protected JavaField(CAstEntity fieldEntity, IClassLoader loader, IClass declaringClass, Collection<Annotation> annotations) { super(FieldReference.findOrCreate(declaringClass.getReference(), Atom.findOrCreateUnicodeAtom(fieldEntity.getName()), TypeReference.findOrCreate(loader.getReference(), TypeName.string2TypeName(fieldEntity.getType().getName()))), fieldEntity.getQualifiers(), declaringClass, declaringClass.getClassHierarchy(), annotations); } }
protected JavaField(CAstEntity fieldEntity, IClassLoader loader, IClass declaringClass, Collection<Annotation> annotations) { super(FieldReference.findOrCreate(declaringClass.getReference(), Atom.findOrCreateUnicodeAtom(fieldEntity.getName()), TypeReference.findOrCreate(loader.getReference(), TypeName.string2TypeName(fieldEntity.getType().getName()))), fieldEntity.getQualifiers(), declaringClass, declaringClass.getClassHierarchy(), annotations); } }