public void handleClass(ADefaultClassDeclIR node) throws AnalysisException { // We want only to treat fields and methods specified by the user. // This case helps us avoiding visiting invariant methods for (AFieldDeclIR f : node.getFields()) { f.apply(decorator); } for (AMethodDeclIR m : node.getMethods()) { m.apply(decorator); } }
public AMethodDeclIR consCopySignature(AMethodTypeIR methodType) { AMethodDeclIR method = new AMethodDeclIR(); method.setIsConstructor(false); method.setImplicit(false); method.setAccess(IJavaConstants.PUBLIC); method.setName(COPY); method.setMethodType(methodType); return method; }
/** * Creates a new complete constructor {@code ATypeImportIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param decl_ the {@link ATypeDeclIR} node for the {@code decl} child of this {@link ATypeImportIR} node */ public ATypeImportIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, String name_, String renamed_, String fromModuleName_, ATypeDeclIR decl_) { super(sourceNode_,tag_,metaData_,name_,renamed_,fromModuleName_); this.setDecl(decl_); }
public AStateDeclIR getStateDecl(AModuleDeclIR module) { for (SDeclIR decl : module.getDecls()) { if (decl instanceof AStateDeclIR) { return (AStateDeclIR) decl; } } return null; }
private boolean isIRGenerated(AMethodDeclIR method) { return method.getTag() instanceof IRGeneratedTag; } }
@Override public String getAccess(AFieldDeclIR decl) { return decl.getAccess(); }
@Override public List<AFieldDeclIR> getDecls(SClassDeclIR classDecl) { return classDecl.getFields(); } };
/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }
/** * Creates a new tree field only constructor {@code AFunctionValueImportIR TAG=function} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param typeParams_ the {@link NodeList} node for the {@code typeParams} child of this {@link AFunctionValueImportIR} node */ public AFunctionValueImportIR(String name_, String renamed_, String fromModuleName_, List<? extends ATokenNameIR> typeParams_) { super(null,null,null,name_,renamed_,fromModuleName_,null); this.setTypeParams(typeParams_); }
/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }
/** * Creates a new complete constructor {@code AMutexSyncDeclIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param opnames_ the {@link NodeList} node for the {@code opnames} child of this {@link AMutexSyncDeclIR} node */ public AMutexSyncDeclIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, List<? extends SNameIR> opnames_) { super(sourceNode_,tag_,metaData_); this.setOpnames(opnames_); }
/** * Creates a new tree field only constructor {@code AModuleExportsIR TAG=module} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param exports_ the {@link NodeListList} node for the {@code exports} child of this {@link AModuleExportsIR} node */ public AModuleExportsIR(Collection<? extends List<SExportIR>> exports_) { super(null,null,null); this.setExports(exports_); }
public AMethodDeclIR consDefaultCtorSignature(String className) { AMethodDeclIR constructor = new AMethodDeclIR(); constructor.setImplicit(false); constructor.setAccess(IJavaConstants.PUBLIC); constructor.setIsConstructor(true); constructor.setName(className); return constructor; }
/** * Creates a new tree field only constructor {@code ATypeImportIR TAG=type} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param decl_ the {@link ATypeDeclIR} node for the {@code decl} child of this {@link ATypeImportIR} node */ public ATypeImportIR(String name_, String renamed_, String fromModuleName_, ATypeDeclIR decl_) { super(null,null,null,name_,renamed_,fromModuleName_); this.setDecl(decl_); }
/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }
/** * Creates a new complete constructor {@code AFunctionValueImportIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param typeParams_ the {@link NodeList} node for the {@code typeParams} child of this {@link AFunctionValueImportIR} node */ public AFunctionValueImportIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, String name_, String renamed_, String fromModuleName_, STypeIR importType_, List<? extends ATokenNameIR> typeParams_) { super(sourceNode_,tag_,metaData_,name_,renamed_,fromModuleName_,importType_); this.setTypeParams(typeParams_); }
/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }
/** * Creates a new tree field only constructor {@code AMutexSyncDeclIR TAG=mutexSync} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param opnames_ the {@link NodeList} node for the {@code opnames} child of this {@link AMutexSyncDeclIR} node */ public AMutexSyncDeclIR(List<? extends SNameIR> opnames_) { super(null,null,null); this.setOpnames(opnames_); }
/** * Creates a new complete constructor {@code AModuleExportsIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param exports_ the {@link NodeListList} node for the {@code exports} child of this {@link AModuleExportsIR} node */ public AModuleExportsIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, Collection<? extends List<SExportIR>> exports_) { super(sourceNode_,tag_,metaData_); this.setExports(exports_); }
/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }