{"id":317072,"date":"2021-01-28T03:00:14","date_gmt":"2021-01-28T03:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=317072"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=317072","title":{"rendered":"\u0422\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u00ab\u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f\u00bb \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ed\/_v\/5f\/ed_v5fwf23roqyqqb55pw_mehmk.jpeg\"><\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0443\u0441\u043f\u0435\u0445\u0430, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u00ab\u043a\u0430\u043a \u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c\u00bb. \u0412\u0435\u0441\u043d\u043e\u0439 2020 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u043e\u043d\u0443\u0441\u0430 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u043e\u043c \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0435 (\u0441\u043f\u043e\u0439\u043b\u0435\u0440: \u0437\u0430\u043d\u044f\u043b\u0438 2-\u0435 \u043c\u0435\u0441\u0442\u043e). \u0423\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u0437 \u043f\u043e\u043b\u0443\u0444\u0438\u043d\u0430\u043b\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0447\u0435\u043c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f. \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u043e \u043d\u0435\u0439 \u0438 \u0441\u0432\u043e\u0451\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"zadacha\">\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u0435\u0439\u0441 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d Deutsche Bank \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 WEB-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430.<br \/>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0410\u043b\u0433\u043e\u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u2013 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Java. \u041a\u0430\u0436\u0434\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code>AbstractTradingAlgorythm<\/code>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">AbstractTradingAlgorythm.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public abstract class AbstractTradingAlgorithm {      abstract void handleTicker(Ticker ticker) throws Exception;      public void receiveTick(String tick) throws Exception {         handleTicker(Ticker.parse(tick));     }      static class Ticker {         String pair;         double price;         static Ticker parse(String tick) {            Ticker ticker = new Ticker();            String[] tickerSplit = tick.split(&quot;,&quot;);            ticker.pair = tickerSplit[0];            ticker.price = Double.valueOf(tickerSplit[1]);            return ticker;        }      }  }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0421\u0430\u043c \u0436\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0442\u0435\u0431\u0435 \u0442\u0440\u0438 \u0432\u0435\u0449\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0448\u044c \u043b\u0438 \u0442\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <\/li>\n<li>\u0411\u0443\u0434\u0443\u0442 \u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/li>\n<li>\u0423\u0441\u043f\u0435\u0448\u0435\u043d \u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e &quot;\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 <code>new &lt;ClassName&gt;().receiveTick(\u201cRUBHGD,100.1\u201d)<\/code> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 runtime exceptions&quot;.<\/li>\n<\/ol>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rr\/ua\/gn\/rruagn_s0ajc0z8z3la7-imju1i.png\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0443 \u043e\u043a\u0435\u0439, <a href=\"https:\/\/spring.io\/guides\/gs\/testing-restdocs\/\" rel=\"nofollow noopener noreferrer\">\u0441\u043a\u0435\u043b\u0435\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 spring \u043d\u0430\u043a\u0438\u0434\u0430\u0442\u044c \u0434\u0435\u043b\u043e \u043d\u0430 5-10 \u043c\u0438\u043d\u0443\u0442<\/a>. \u041f\u0443\u043d\u043a\u0442 1 \u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u0434\u0443\u043c\u0430\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u0431\u0443\u0434\u0443. \u0414\u043b\u044f \u043f\u0443\u043d\u043a\u0442\u0430 2 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043d\u043e \u0437\u0430\u0447\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0430 \u043c\u0435\u043d\u044f. \u041c\u043e\u0436\u0435\u0442 \u0438 \u043f\u0443\u043d\u043a\u0442 3 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e \u043f\u0443\u043d\u043a\u0442\u0443 2. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c, \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434, \u043d\u0443 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Java, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u043e\u0439. <\/p>\n<p>  <\/p>\n<h2 id=\"reshenie\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0431\u044f\u0442\u0430: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443 \u0434\u0436\u0430\u0432\u0443, \u043e\u0442\u0434\u0430\u0432\u0430\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u043e\u0441\u044c \u0438 \u0433\u0440\u0435\u043f\u0430\u043b\u0438 stdout. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043d\u043e \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430\u043c \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u043b\u043e\u0432\u043e Java, \u0430 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445&#8230;<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mq\/ol\/o6\/mqolo6blfrdt6qnrn3y8declln4.jpeg\"><br \/>  <em>\u2026 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c.<\/em><\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, Java \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0436\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f. \u041f\u0440\u0430\u0432\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u0430, \u043a\u0430\u043a \u0431\u044b \u044d\u0442\u043e \u043d\u0438 \u0437\u0432\u0443\u0447\u0430\u043b\u043e, \u0432 \u043a\u043e\u0434\u0435. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 6 \u0432\u0435\u0440\u0441\u0438\u0438, \u0432 Java SE \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 javax.tools, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 API \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Java.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0442\u0430\u043a\u0438\u0435, \u043a\u0430\u043a \u0444\u0430\u0439\u043b\u044b \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c <code>JavaCompiler<\/code>, \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439 \u043e \u043d\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/javax\/tools\/JavaCompiler.html\" rel=\"nofollow noopener noreferrer\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u043e\u0442\u0442\u0443\u0434\u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0432 \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438, \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441 <code>JavaSourceFromString<\/code>. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u043d\u0430\u0448\u0435\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0438\u0437\u0432\u043d\u0435.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">JavaSourceFromString.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import javax.tools.SimpleJavaFileObject; import java.net.URI;  public class JavaSourceFromString extends SimpleJavaFileObject {     final String code;      public JavaSourceFromString(String name, String code) {         super(URI.create(&quot;string:\/\/\/&quot; + name.replace('.', '\/') + Kind.SOURCE.extension), Kind.SOURCE);         this.code = code;     }      @Override     public CharSequence getCharContent(boolean ignoreEncodingErrors) {         return code;     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0443\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043d\u0435\u0442. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443, \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0438\u0445 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <code>JavaFileObject<\/code>. \u042d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442.<br \/>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 <code>Validator<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public class Validator {     private JavaSourceFromString sourceObject;      public Validator(String className, String source) {         sourceObject = new JavaSourceFromString(className, source);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public class Validator {     ...     public List&lt;Diagnostic&lt;? extends JavaFileObject&gt;&gt; compile() {         \/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435         var compiler = ToolProvider.getSystemJavaCompiler();          \/\/ \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c         var compilationUnits = Collections.singletonList(sourceObject);         var diagnostics = new DiagnosticCollector&lt;JavaFileObject&gt;();         compiler.getTask(null, null, diagnostics, null, null, compilationUnits).call();          \/\/ \u0432\u043e\u0437\u0432\u043e\u0440\u0430\u0449\u0430\u0435\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443         return diagnostics.getDiagnostics();     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public void TestTradeAlgo() {         var className = &quot;TradeAlgo&quot;;         var sourceString = &quot;public class TradeAlgo extends AbstractTradingAlgorithm{\\n&quot; +                 &quot;@Override\\n&quot; +                 &quot;    void handleTicker(Ticker ticker) throws Exception {\\n&quot; +                 &quot;       System.out.println(\\&quot;TradeAlgo::handleTicker\\&quot;);\\n&quot; +                 &quot;    }\\n&quot; +                 &quot;}\\n&quot;;         var validator = new Validator(className, sourceString);         for (var message : validator.compile()) {             System.out.println(message);         }     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>compile<\/code> \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442. \u0427\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e? \u0410 \u0432\u043e\u0442 \u0447\u0442\u043e.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/e9\/sk\/uv\/e9skuvns7-zlw54hmd3szwntuqe.png\"><br \/>  \u041d\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f. \u041a\u0440\u0430\u0441\u043d\u044b\u043c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u043e\u0431\u0432\u0435\u0434\u0435\u043d\u044b <code>.class<\/code> \u0444\u0430\u0439\u043b\u044b, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c. \u041a\u0443\u0434\u0430 \u0438\u0445 \u0434\u0435\u0432\u0430\u0442\u044c, \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u0438\u0442\u044c, \u043d\u0435 \u0437\u043d\u0430\u044e \u2014 \u0436\u0434\u0443 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u041d\u043e \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442? \u0427\u0442\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 runtime, \u0438 \u0442\u0430\u043c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438.<br \/>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 POJO \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0433\u043e\u043d\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TestResult.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class TestResult {     private boolean success;     private String comment;      public TestResult(boolean success, String comment) {         this.success = success;         this.comment = comment;     }      public boolean success() {         return success;     }      public String getComment() {         return comment;     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441 <code>Validator<\/code> \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public class Validator {     ...     private String className;     private boolean compiled = false;      public Validator(String className, String source) {         this.className = className;         ...     }      ...      public TestResult testRun(String arg) {         var result = new TestResult(false, &quot;Failed to compile&quot;);         if (compiled) {             try {                 \/\/ \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441                 var classLoader = URLClassLoader.newInstance(new URL[]{new File(&quot;&quot;).toURI().toURL()});                 var c = Class.forName(className, true, classLoader);                 \/\/ \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u0430                 var constructor = c.getConstructor();                 var instance = constructor.newInstance();                 \/\/ \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043c\u0435\u0442\u043e\u0434                 c.getDeclaredMethod(&quot;receiveTick&quot;, String.class).invoke(instance, arg);                 result = new TestResult(true, &quot;Success&quot;);             } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException | ClassNotFoundException | RuntimeException | MalformedURLException | InstantiationException e) {                 var sw = new StringWriter();                 e.printStackTrace(new PrintWriter(sw));                 result = new TestResult(false, sw.toString());             }         }         return result;     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public void TestTradeAlgo() {         ...         var result = validator.testRun(&quot;RUBHGD,100.1&quot;);         System.out.println(result.success() + &quot; &quot; + result.getComment());     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e API \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<h2 id=\"kakie-problemy\">\u041a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b?<\/h2>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0415\u0449\u0451 \u0440\u0430\u0437 \u043d\u0430\u043f\u043e\u043c\u043d\u044e \u043f\u0440\u043e \u043a\u0443\u0447\u0443 <code>.class<\/code> \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>  <\/li>\n<li>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0438\u0434\u0451\u0442 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0435\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0435\u0441\u0442\u044c \u0440\u0438\u0441\u043a \u043e\u0442\u043a\u0430\u0437\u0430 \u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u043d\u0435\u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0433\u043e <code>.class<\/code> \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>  <\/li>\n<li>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438 \u0432\u0440\u0435\u0434\u043e\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java. \u0412\u0435\u0434\u044c, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0432 \u0442\u0435\u043b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0437\u0430\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u044b \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0430 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0430 \u044d\u0442\u0438\u043c \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043d\u0438\u043a\u0442\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u044f \u043d\u0435 \u043d\u0430\u0434\u043e)<\/p>\n<p>  <\/p>\n<p>P.S. <a href=\"https:\/\/github.com\/Stepami\/sourceCodeValidator\" rel=\"nofollow noopener noreferrer\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/539424\/\"> https:\/\/habr.com\/ru\/post\/539424\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ed\/_v\/5f\/ed_v5fwf23roqyqqb55pw_mehmk.jpeg\"><\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0443\u0441\u043f\u0435\u0445\u0430, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u00ab\u043a\u0430\u043a \u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c\u00bb. \u0412\u0435\u0441\u043d\u043e\u0439 2020 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u043e\u043d\u0443\u0441\u0430 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u043e\u043c \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0435 (\u0441\u043f\u043e\u0439\u043b\u0435\u0440: \u0437\u0430\u043d\u044f\u043b\u0438 2-\u0435 \u043c\u0435\u0441\u0442\u043e). \u0423\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u0437 \u043f\u043e\u043b\u0443\u0444\u0438\u043d\u0430\u043b\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0447\u0435\u043c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f. \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u043e \u043d\u0435\u0439 \u0438 \u0441\u0432\u043e\u0451\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-317072","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=317072"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317072\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}