Meta tags:
Headings (most frequently used words):
blog, this, technical, affiliations, inspired, by, actual, events, dustin, pages, saturday, september, 25, 2021, license, disclaimers, search, translate, archive, labels, subscribe, to, my, non, similar, blogs, popular, posts, software, development, support, wikipedia, jdk, 18, code, snippets, in, java, api, documentation, no, comments,
Text of the page (most frequently used words):
the (62), java (45), this (42), code (32), var (27), highlighter (25), and (25), for (22), new (21), function (19), null (18), match (18), snippet (17), #september (16), may (15), str (14), jdk (14), november (14), december (14), january (14), march (14), snippetexample (14), div (13), october (13), february (13), april (13), june (13), july (13), august (13), javadoc (13), document (12), documentation (12), return (11), index (11), class (11), that (11), blog (10), are (10), snippets (10), newinstance (10), doc (9), replace (9), sender (9), regexp (9), length (9), tag (9), iframe (8), createelement (8), matches (8), flashcopier (8), development (8), with (8), jep (8), generated (8), instance (8), window (7), toolbar (7), css (7), software (7), 413 (7), label (6), func (6), wnd (6), utils (6), name (6), regex (6), html (6), source (6), via (6), can (6), use (6), post (6), javaone (6), package (6), while (5), link (5), true (5), value (5), not (5), ago (5), objects (5), one (5), api (5), dustin (5), version (4), classname (4), commands (4), cmd (4), check (4), lines (4), min (4), groovy (4), posts (4), years (4), 2021 (4), any (4), substring (4), public (4), close (3), contentwindow (3), open (3), width (3), height (3), copystyles (3), write (3), continue (3), innerhtml (3), fixforblogger (3), prototype (3), result (3), getmatches (3), exec (3), appendchild (3), clipboardswf (3), clipboarddata (3), syndicated (3), date (3), postgresql (3), would (3), available (3), guava (3), instead (3), early (3), windows (3), based (3), oracle (3), html5 (3), 2011 (3), net (3), method (3), string (3), labels (3), more (3), used (3), make (3), external (3), inspired (3), actual (3), events (3), share (3), including (3), itself (3), level (3), examples (3), example (3), final (3), highlight (3), where (3), constructor (3), openjdk (3), what (3), focus (2), print (2), alert (2), body (2), removechild (2), about (2), _blank (2), scrollbars (2), strings (2), create (2), indexof (2), parentnode (2), sourcedoc (2), links (2), false (2), addcontrols (2), collapse (2), showcolumns (2), else (2), span (2), split (2), comments (2), push (2), attribute (2), syntaxhighlighter (2), view (2), originalcode (2), clipboard (2), now (2), style (2), 0px (2), 500px (2), 2007 (2), affiliations (2), geeks (2), dzone (2), javaworld (2), dustinmarx (2), since (2), have (2), util (2), pgsql (2), there (2), classes (2), enums (2), methods (2), interfaces (2), being (2), get (2), blogs (2), was (2), serialization (2), non (2), recently (2), access (2), release (2), build (2), demonstrations (2), rmoug (2), ability (2), filtering (2), collections (2), framework (2), introduces (2), its (2), part (2), thoughts (2), blogging (2), technical (2), observations (2), kind (2), loading (2), publications (2), jax (2), 2016 (2), 2014 (2), 2013 (2), 2012 (2), 2010 (2), javafx (2), general (2), flex (2), commons (2), jeps (2), all (2), other (2), content (2), sites (2), were (2), license (2), home (2), comment (2), far (2), details (2), files (2), better (2), author (2), also (2), useful (2), fragments (2), separate (2), directly (2), preferred (2), has (2), less (2), when (2), addresses (2), shortcomings (2), shown (2), next (2), jdk18 (2), listing (2), arguments (2), private (2), targeted (2), 8201533 (2), https (2), processit (2), supported (2), syntax (2), included (2), introduce (2), inline (2), declare (2), fragment (2), from (2), printing, dialog, 300, 150, aboutdialog, tools, command, destdoc, getelementsbytagname, isbloggermode, regexlib, multilineccomments, singlelineccomments, singlelineperlcomments, doublequotedstring, singlequotedstring, nogutter, tabstospaces, wrapcolumn, sortcallback, addbit, test, bar, columns, showevery, trim, math, cdata, undefined, powered, blogger, support, wikipedia, expandsource, expand, collapsed, viewsource, plain, 750, 400, location, resizable, menubar, copytoclipboard, copy, setdata, text, your, printsource, csstext, position, absolute, left, top, 2004, alex, gorbatchev, http, www, dreamprojections, com, portions, javalobby, complete, profile, nearly, beginning, developers, worked, dates, times, time, formatting, parsing, handy, pass, collection, stored, array, generally, very, easy, thing, passing, arrays, numerous, added, significant, coverage, announced, approximately, months, include, hold, commonly, writte, you, fortunate, enough, using, newly, obvious, least, choice, implementing, equals, hashcode, tostring, multiple, reasons, might, want, custom, relying, default, serializing, serializable, attributes, downloaded, laptop, because, programdata, javapath, posted, had, decided, opera, training, days, stated, picker, conveniences, easily, perform, transformation, operations, transforming, collections2, called, isnullorwhitespace, checks, whether, provided, checking, empty, white, space, only, popular, advanced, stump, chump, interview, questions, bill, jackson, ruminations, log4j, fixes, auto, reconfigure, thread, leak, michael, ramblings, bigip, silly, reason, connection, error, ssl_hs_rxhello, 7295, unsupported, techstacks, similar, quidi, vidi, practical, atom, subscribe, xquery, xml, wildfly, web, visualvm, vista, valhalla, unit, testing, testng, terracotta, swing, subversion, spring, management, 126, servlets, security, scala, ruby, rest, raspberry, puppet, properties, powershell, portals, poi, php, osgi, openxml4j, openlaszlo, nosql, noop, netbeans, mysql, mobile, maven, lucene, log4j2, linux, latex, kotlin, junit, json, jsf, jruby, jquery, jpa, jmx, jfreechart, jedit, jdeveloper, jdbc, jboss, jaxx, jaxb, javascript, 415, j2se, intellij, idea, infinispan, humor, hazelcast, 147, gradle, glassfish, firefox, ecmascript, eclipse, dozer, docker, database, contributed, cloud, computing, clojure, cassandra, book, review, blazeds, arduino, apache, aop, ant, annotations, angularjs, android, amber, akka, air, actionscript, 185, 2008, 158, 2009, 156, 214, 112, 2015, 2017, 2018, 2019, 2020, surprisingly, high, cost, variables, capi, case, missing, optional, does, supplant, traditional, frequent, long, term, releases, 2023, archive, translate, search, opinions, expressed, here, own, necessarily, shared, employer, clients, organization, individual, trademarked, names, remain, property, their, respective, trademark, owners, guarantees, made, regarding, accuracy, usefulness, though, effort, accurate, imply, endorsement, linked, writing, animals, harmed, disclaimers, licensed, under, creative, attribution, international, marx, older, newer, pinterest, facebook, blogthis, email, contains, application, reference, contained, way, address, these, concerns, provide, metadata, allows, implicitly, explicitly, specify, validated, presented, appropriate, manner, allow, placed, manipulated, editor, challenges, been, tags, present, such, readable, viewed, presentation, distracting, current, approaches, summarizes, how, those, pre, output, screenshot, related, capabilities, main, entrypoint, target, area, think, particularly, description, info, above, run, through, option, note, highlighted, sections, emphasis, bold, tool, demonstrates, aka, bug, bugs, browse, obtained, rather, than, intended, approach, obtaining, performs, valuable, processing, void, first, contrived, makes, provides, small, taste, brings, listings, github, appear, both, within, read, file, includes, implementation, which, objective, standard, doclet, simplify, inclusion, covers, features, saturday, pages, select, formerly, concerning, cogitations, speculations,
Text of the page (random words):
ntation for jep 413 code snippets in java api documentation which is targeted for jdk 18 the objective of jep 413 is to introduce an snippet tag for javadoc s standard doclet to simplify the inclusion of example source code in api documentation and the jep itself covers the syntax of and features supported by the javadoc snippet tag jep 413 introduces the new snippet javadoc tag we introduce a new inline tag snippet to declare code fragments to appear in the generated documentation it can be used to declare both inline snippets where the code fragment is included within the tag itself and external snippets where the code fragment is read from a separate source file the jep has far more details on what is supported by snippet and what its syntax is this post provides a small taste of what snippet brings to javadoc based documentation and the code listings included in this post are available on github this first contrived code listing makes use of snippet package dustin examples jdk18 javadoc demonstrates code snippet javadoc tag targeted for jdk as part of jep 413 aka bug jdk 8201533 ul li https openjdk java net jeps 413 li li https bugs openjdk java net browse jdk 8201533 li ul an instance of this class is obtained via my link newinstance method rather than via a constructor snippet final snippetexample instance snippetexample newinstance highlight substring newinstance instance processit public class snippetexample no arguments constructor not intended for public use use link newinstance instead to get an instance of me snippet final snippetexample instance snippetexample newinstance highlight substring newinstance private snippetexample preferred approach for obtaining an instance of me return instance of me public snippetexample newinstance return new snippetexample performs valuable processing public void processit when the above code is run through the javadoc tool with the private option code snippets are generated in the html for the class and no arguments constructor note also that the highlighted sections have bold emphasis in the generated html generated class level documentation with snippet generated method level documentation with snippet one area where i think the snippet may be particularly useful is in package documentation a code example of use for a package description is shown in the next code listing for package info java examples and demonstrations of javadoc related capabilities the main entrypoint for the snippets example is the link snippetexample class snippet final snippetexample instance snippetexample newinstance highlight substring snippetexample link substring snippetexample newinstance target snippetexample newinstance package dustin examples jdk18 javadoc the generated html output for this package level documentation is shown in the next screenshot one of the challenges in including code snippets in javadoc based documentation has been that the tags used to present the code such as pre code and code can make the javadoc comment less readable when viewed in source directly instead of via the generated html the snippet javadoc tag can make the code presentation better for the generated html while being less distracting in the source code itself jep 413 addresses the shortcomings of current approaches for including code snippets in javadoc and summarizes how snippet addresses those shortcomings a better way to address all these concerns is to provide a new tag with metadata that allows the author to implicitly or explicitly specify the kind of the content so that it can be validated and presented in an appropriate manner it would also be useful to allow fragments to be placed in separate files that can be directly manipulated by the author s preferred editor jep 413 contains far more details on application of snippet including the ability to reference code contained in external files by dustinmarx at september 25 2021 email this blogthis share to x share to facebook share to pinterest labels java 18 no comments post a comment newer post older post home license inspired by actual events by dustin marx is licensed under a creative commons attribution 4 0 international license disclaimers the opinions expressed here are my own and are not necessarily shared by my employer any clients any other organization or any other individual any trademarked names or labels used in this blog remain the property of their respective trademark owners no guarantees are made regarding the accuracy or usefulness of content on this blog though i do make an effort to be accurate links to external sites do not imply endorsement of the linked to sites no animals were harmed in the writing of this blog search this blog translate blog archive 2023 1 march 1 2021 8 september 5 more frequent java long term releases jdk 18 code snippets in java api documentation java s optional does not supplant all traditional the case of the missing jeps surprisingly high cost of java variables with capi march 1 february 1 january 1 2020 20 december 3 november 2 september 2 august 3 july 2 june 2 may 1 april 1 february 2 january 2 2019 43 december 2 november 3 october 1 september 1 august 4 july 4 june 2 may 3 april 6 march 2 february 4 january 11 2018 97 december 3 november 5 october 4 september 11 august 9 july 6 june 11 may 11 april 9 march 3 february 15 january 10 2017 57 december 3 november 6 october 12 september 5 august 4 july 4 june 6 may 4 april 7 march 4 january 2 2016 45 december 2 november 3 october 4 september 6 august 7 july 3 june 6 may 3 april 3 march 2 february 4 january 2 2015 62 december 6 november 4 october 4 september 4 august 6 july 7 june 4 may 2 april 3 march 7 february 7 january 8 2014 74 december 7 november 4 october 7 september 4 august 7 july 5 june 4 may 4 april 10 march 8 february 5 january 9 2013 75 december 17 november 4 october 8 september 6 august 5 july 5 june 2 may 2 april 7 march 7 february 5 january 7 2012 112 december 4 november 4 october 31 september 3 august 9 july 5 june 6 may 9 april 6 march 10 february 8 january 17 2011 214 december 20 november 10 october 41 september 5 august 19 july 15 june 13 may 20 april 17 march 13 february 20 january 21 2010 156 december 9 november 6 october 10 september 47 august 14 july 9 june 8 may 7 april 7 march 7 february 13 january 19 2009 158 december 11 november 11 october 22 september 16 august 7 july 8 june 16 may 14 april 18 march 11 february 9 january 15 2008 185 december 14 november 18 october 18 september 9 august 9 july 12 june 10 may 17 april 17 march 22 february 14 january 25 2007 57 december 16 november 27 october 14 labels actionscript 28 air 1 akka 2 amber 22 android 6 angularjs 2 annotations 2 ant 11 aop 1 apache commons 4 arduino 1 blazeds 4 blogging 8 book review 66 c c 3 c 2 cassandra 3 clojure 1 cloud computing 6 contributed 2 database 14 docker 1 dozer 1 eclipse 6 ecmascript 1 firefox 6 flex 55 glassfish 9 gradle 15 groovy 147 guava 16 hazelcast 1 html5 24 humor 3 infinispan 2 intellij idea 7 j2se 5 5 java general 415 java 10 15 java 11 28 java 12 21 java 13 9 java 14 11 java 15 2 java 16 6 java 17 2 java 18 1 java 21 1 java 6 29 java 7 54 java 8 58 java 9 27 java ee 5 7 java ee 6 6 java ee 7 7 java ee 8 2 javafx 49 javaone 2010 55 javaone 2011 39 javaone 2012 36 javaone 2013 1 javaone 2014 1 javaone 2016 1 javascript 30 jax rs 10 jax ws 2 jaxb 15 jaxx 1 jboss 3 jdbc 4 jdeveloper 2 jedit 1 jfreechart 11 jmx 53 jpa 8 jquery 1 jruby 8 jsf 5 json 6 junit 7 kotlin 2 latex 1 linux 8 log4j2 4 lucene 1 maven 1 mobile development 3 mysql 4 netbeans 69 noop 1 nosql 2 open source 13 openlaszlo 20 openxml4j 3 oracle 56 osgi 2 php 7 poi 5 portals 1 postgresql 13 powershell 5 properties 4 publications 28 puppet 1 raspberry pi 2 rest 17 rmoug 16 ruby 3 scala 17 security 4 servlets 2 software development 126 software development management 7 spring framework 21 subversion 1 swing 1 terracotta 1 testng 2 unit testing 13 valhalla 17 vista 6 visualvm 9 web development 13 wildfly 1 windows 7 xml 16 xquery 11 loading loading subscribe to this blog posts atom posts my non technical blog observations of the practical kind quidi vidi 3 years ago similar technical blogs blogging techstacks bigip silly reason for connection error ssl_hs_rxhello 7295 unsupported version 70 8 years ago michael s software thoughts ramblings log4j 2 fixes auto reconfigure thread leak 12 years ago bill jackson s software ruminations advanced java stump the chump interview questions part 3 17 years ago popular posts checking for null or empty or white space only string in java net framework 4 introduces a new method on its string class called isnullorwhitespace that checks whether a provided string is null em filtering and transforming java collections with guava s collections2 one of the conveniences of groovy is the ability to easily perform filtering and transformation operations on collections via groovy s html5 date picker i recently posted that i had decided to use opera in my html5 demonstrations for rmoug training days 2011 as i stated in that post a bi oracle java on windows c programdata oracle java javapath i recently downloaded an early access release of jdk 9 build 68 for my windows 7 based laptop because this is an early release i was serializing java objects with non serializable attributes there are multiple reasons one might want to use custom serialization instead of relying on java s default serialization one of the mo guava s objects class equals hashcode and tostring if you are fortunate enough to be using jdk 7 the newly available objects class is the obvious at least to me choice for implementing jdk 7 the new objects class it was announced approximately 18 months ago that jdk 7 would include a new java util objects class that would hold commonly writte jdk 7 new interfaces classes enums and methods there are numerous new classes enums methods and interfaces being added to jdk 7 that may not get significant coverage in the blogs and passing arrays to a postgresql pl pgsql function it can be handy to pass a collection of strings to a pl pgsql stored function via a postgresql array this is generally a very easy thing date time formatting parsing java 8 style since nearly the beginning of java java developers have worked with dates and times via the java util date class since jdk 1 0 and the software development dustinmarx view my complete profile affiliations portions of this blog are syndicated at javaworld dzone javalobby and java code geeks affiliations version v http www dreamprojections com syntaxhighlighter 2004 2007 alex gorbatchev clipboardswf null version 1 5 1 dp syntaxhighlighter dp sh dp sh toolbar commands expandsource label expand source check function highlighter return highlighter collapse func function sender highlighter sender parentnode removechild sender highlighter div classname highlighter div classname replace collapsed viewsource label view plain func function sender highlighter var code dp sh utils fixforblogger highlighter originalcode replace var wnd window open _blank width 750 height 400 location 0 resizable 1 menubar 0 scrollbars 0 wnd document write code wnd document close copytoclipboard label copy to clipboard check function return window clipboarddata null dp sh clipboardswf null func function sender highlighter var code dp sh utils fixforblogger highlighter originalcode replace g replace g if window clipboarddata window clipboarddata setdata text code else if dp sh clipboardswf null var flashcopier highlighter flashcopier if flashcopier null flashcopier document createelement div highlighter flashcopier flashcopier highlighter div appendchild flashcopier flashcopier innerhtml alert the code is in your clipboard now printsource label print func function sender highlighter var iframe document createelement iframe var doc null iframe style csstext position absolute width 0px height 0px left 500px top 500px document body appendchild iframe doc iframe contentwindow document dp sh utils copystyles doc window document doc write highlighter div innerhtml doc close iframe contentwindow focus iframe contentwindow print alert printing document body removechild iframe about label func function highlighter var wnd window open _blank dialog width 300 height 150 scrollbars 0 var doc wnd document dp sh utils copystyles doc window document doc write dp sh strings aboutdialog replace v dp sh version doc close wnd focus dp sh toolbar create function highlighter var div document createelement div div classname tools for var name in dp sh toolbar commands var cmd dp sh toolbar commands name if cmd check null cmd check highlighter continue div innerhtml cmd label return div dp sh toolbar command function name sender var n sender while n null n classname indexof dp highlighter 1 n n parentnode if n null dp sh toolbar commands name func sender n highlighter dp sh utils copystyles function destdoc sourcedoc var links sourcedoc getelementsbytagname link for var i 0 i dp sh utils fixforblogger function str return dp sh isbloggermode true str replace br s gi n str dp sh regexlib multilineccomments new regexp s s gm singlelineccomments new regexp gm singlelineperlcomments new regexp gm doublequotedstring new regexp n g singlequotedstring new regexp n g dp sh match function value index css this value value this index index this length value length this css css dp sh highlighter function this nogutter false this addcontrols true this collapse false this tabstospaces true this wrapcolumn 80 this showcolumns true dp sh highlighter sortcallback function m1 m2 if m1 index m2 index return 1 else if m1 length m2 length return 1 return 0 dp sh highlighter prototype createelement function name var result document createelement name result highlighter this return result dp sh highlighter prototype getmatches function regex css var index 0 var match null while match regex exec this code null this matches this matches length new dp sh match match 0 match index css dp sh highlighter prototype addbit function str css if str null str length 0 return var span this createelement span str str replace g str str replace str str replace n gm if css null if br gi test str var lines str split for var i 0 i c index match index gi n var lines html split n if this addcontrols true this bar appendchild dp sh toolbar create this if this showcolumns var div this createelement div var columns this createelement div var showevery 10 var i 1 while i0 i if trim lines i length 0 continue var matches regex exec lines i if matches null matches length 0 min math min matches 0 length min if min 0 for var i 0 i gm cdata this getmatches new regexp gm comments regex new regexp w s s w w gm while match regex exec this code null if match 1 null continue push this matches new dp sh match match 1 match index attribute if match 2 undefined push this matches new dp sh match match 2 match index match 0 indexof match 2 attribute value this getmatches new regexp gm tag regex new regexp support wikipedia po...
|