code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Input
public List<String> getSettingsClassNames() {
return settingsClassNames;
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | getSettingsClassNames | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
public void setSettingsClassNames(List<String> settingsClassNames) {
this.settingsClassNames = settingsClassNames;
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | setSettingsClassNames | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
public void settingsClassName(String name) {
settingsClassNames.add( name );
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | settingsClassName | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
@Input
public String getSummary() {
return summary;
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | getSummary | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
public void setSummary(String summary) {
this.summary = summary;
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | setSummary | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
@Input
public String getDescription() {
return description;
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | getDescription | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
public void setDescription(String description) {
this.description = description;
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | setDescription | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
@Override
public String toString() {
return "SettingsDocSection(" + name + " [" + explicitPosition + "])";
} | DSL extension for defining a section in the settings appendix in the User Guide.
@author Steve Ebersole | toString | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocSection.java | Apache-2.0 |
@Override
public void apply(Project project) {
// if not already, so we can access HibernateVersion
project.getPluginManager().apply( ModuleAspect.class );
// create and register the DSL extension
final SettingsDocExtension dslExtension = new SettingsDocExtension( project );
project.getExtensions().add( EXT... | Integrates collection of documentation about Hibernate configuration properties
from the Javadoc of the project, and generates an Asciidoc document from it
which is then included into the User Guide. | apply | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocumentationPlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingsDocumentationPlugin.java | Apache-2.0 |
public static Map<SettingsDocSection, SortedSet<SettingDescriptor>> collectSettingDescriptors(
Directory javadocDirectory,
Map<String, SettingsDocSection> sections,
String publishedJavadocsUrl) {
return collectSettingDescriptors( javadocDirectory.getAsFile(), sections, publishedJavadocsUrl );
} | Processes Javadoc into SettingDescriptor based on the JDK 11 javadoc format
@author Marko Bekhta
@author Steve Ebersole | collectSettingDescriptors | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
public static Map<SettingsDocSection, SortedSet<SettingDescriptor>> collectSettingDescriptors(
File javadocDirectory,
Map<String, SettingsDocSection> sections,
String publishedJavadocsUrl) {
final Map<SettingsDocSection, SortedSet<SettingDescriptor>> result = Utils.createResultMap( sections );
// Load the... | Processes Javadoc into SettingDescriptor based on the JDK 11 javadoc format
@author Marko Bekhta
@author Steve Ebersole | collectSettingDescriptors | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
public static Document loadConstants(File javadocDirectory) {
try {
final File constantValuesFile = new File( javadocDirectory, "constant-values.html" );
return Jsoup.parse( constantValuesFile );
}
catch (IOException e) {
throw new IllegalStateException( "Unable to access javadocs `constant-values.html`"... | Processes Javadoc into SettingDescriptor based on the JDK 11 javadoc format
@author Marko Bekhta
@author Steve Ebersole | loadConstants | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static Document loadClassJavadoc(String enclosingClass, File javadocDirectory) {
final String classJavadocFileName = enclosingClass.replace( ".", File.separator ) + ".html";
final File classJavadocFile = new File( javadocDirectory, classJavadocFileName );
try {
return Jsoup.parse( classJavadocFile );
... | Processes Javadoc into SettingDescriptor based on the JDK 11 javadoc format
@author Marko Bekhta
@author Steve Ebersole | loadClassJavadoc | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static boolean isUselessJavadoc(Element fieldJavadocElement) {
return fieldJavadocElement.selectFirst( "div.block" ) == null;
} | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | isUselessJavadoc | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static void applyMetadata(
String className,
String publishedJavadocsUrl,
SettingWorkingDetails settingDetails,
Element fieldJavadocElement) {
processNotes(
fieldJavadocElement,
(name, content) -> {
switch ( name ) {
case "Default Value:": {
fixUrls( className, publishedJ... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | applyMetadata | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static SettingsDocSection findMatchingDocSection(
String className,
Map<String, SettingsDocSection> sections) {
for ( Map.Entry<String, SettingsDocSection> entry : sections.entrySet() ) {
if ( entry.getValue().getSettingsClassNames().contains( className ) ) {
return entry.getValue();
}
}
r... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | findMatchingDocSection | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static String stripQuotes(String value) {
if ( value.startsWith( "\"" ) && value.endsWith( "\"" ) ) {
return value.substring( 1, value.length() - 1 );
}
return value;
} | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | stripQuotes | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static void processNotes(
Element fieldJavadocElement,
NoteConsumer noteConsumer) {
final Element notesElement = fieldJavadocElement.selectFirst( "dl" );
if ( notesElement == null ) {
return;
}
// should be a list of alternating <dt/> and <dd/> elements.
final Elements notesChildren = notesE... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | processNotes | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static Elements cleanupFieldJavadocElement(
Element fieldJavadocElement,
String className,
String publishedJavadocsUrl) {
// Before proceeding let's make sure that the javadoc structure is the one that we expect:
if ( !isValidFieldJavadocStructure( fieldJavadocElement ) ) {
throw new IllegalStat... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | cleanupFieldJavadocElement | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static void fixUrls(
String className,
String publishedJavadocsUrl,
Element fieldJavadocElement) {
for ( Element link : fieldJavadocElement.getElementsByTag( "a" ) ) {
// only update links if they are not external:
if ( !isExternalLink( link ) ) {
String href = link.attr( "href" );
if (... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | fixUrls | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static boolean isExternalLink(Element link) {
String href = link.attr( "href" );
return link.hasClass( "externalLink" )
|| link.hasClass( "external-link" )
|| href != null && href.startsWith( "http" );
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | isExternalLink | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
private static boolean isValidFieldJavadocStructure(Element fieldJavadocElement) {
// Field's DOM sub-structure that we are expecting should be:
//
// <ul class="blockList">
// <li class="blockList">
// <h4>DIALECT</h4>
// <pre>
// <!-- might have @Incubating, @Deprecated or @Remove
//... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | isValidFieldJavadocStructure | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk11/SettingsCollector.java | Apache-2.0 |
public static String convertFieldJavadocHtmlToAsciidoc(
Element fieldJavadocElement,
String className,
String simpleFieldName,
String publishedJavadocsUrl) {
Elements javadocsToConvert = cleanupFieldJavadocElement( fieldJavadocElement, className, simpleFieldName, publishedJavadocsUrl );
return new DomT... | Convert the DOM representation of the field Javadoc to Asciidoc format
@param fieldJavadocElement The {@code <section class="detail"/>} element for the setting field
@param className The name of the settings class
@param simpleFieldName The name of the field defining the setting (relative to {@code className})
@param ... | convertFieldJavadocHtmlToAsciidoc | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private static Elements cleanupFieldJavadocElement(Element fieldJavadocElement,
String className,
String simpleFieldName,
String publishedJavadocsUrl) {
// Before proceeding let's make sure that the javadoc structure is the one that we expect:
if ( !isValidFieldJavadocStructur... | Convert the DOM representation of the field Javadoc to Asciidoc format
@param fieldJavadocElement The {@code <section class="detail"/>} element for the setting field
@param className The name of the settings class
@param simpleFieldName The name of the field defining the setting (relative to {@code className})
@param ... | cleanupFieldJavadocElement | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private static void fixUrls(String className,
String publishedJavadocsUrl,
Element fieldJavadocElement) {
for ( Element link : fieldJavadocElement.getElementsByTag( "a" ) ) {
// only update links if they are not external:
if ( !isExternalLink( link ) ) {
String href = link.attr( "href" );
... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | fixUrls | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private static boolean isExternalLink(Element link) {
String href = link.attr( "href" );
return link.hasClass( "externalLink" )
|| link.hasClass( "external-link" )
|| href != null && href.startsWith( "http" );
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | isExternalLink | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private static boolean isValidFieldJavadocStructure(Element fieldJavadocElement) {
// Field's DOM sub-structure that we are expecting should be:
// <section class="detail" id="FIELD_NAME">
// <h3>FIELD_NAME</h3>
// <div class="member-signature"> we don't care about this div </div>
// <div class="block"... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | isValidFieldJavadocStructure | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
public String convert() {
// Elements consist of nodes, that can themselves be elements or simple nodes.
// Simple nodes are the ones that will produce text.
// Elements are various tags that will be converted to some asciidoc syntax
for ( Element element : elements ) {
visitElement( element );
}
... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | convert | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitNode(Node node) {
// We know about 2 types of nodes that we care about:
// 1. Element -- means that it is some tag,
// so we will defer the decision what to do about it to the visitElement.
// 2. TextNode -- simple text that we'll just add to the converted result.
//
// If we encou... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitNode | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitElement(Element element) {
String tag = element.tagName();
Consumer<Element> visitor = elementVisitorsByTag.get( tag );
if ( visitor == null ) {
// If we encounter an element that we are not handling --
// we want to fail as the result might be missing some details:
throw new Ill... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitElement | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitDiv(Element div) {
boolean deprecation = div.hasClass( "deprecationBlock" );
if ( deprecation ) {
converted.append( "[WARNING]\n====\n" );
}
for ( Node childNode : div.childNodes() ) {
visitNode( childNode );
}
converted.append( '\n' );
if ( deprecation ) {
converted.a... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitDiv | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitCode(Element code) {
converted.append( "`" );
for ( Node childNode : code.childNodes() ) {
visitNode( childNode );
}
converted.append( "`" );
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitCode | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitBold(Element bold) {
converted.append( "**" );
for ( Node childNode : bold.childNodes() ) {
visitNode( childNode );
}
converted.append( "**" );
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitBold | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitLi(Element li) {
converted.append( "\n * " );
for ( Node childNode : li.childNodes() ) {
visitNode( childNode );
}
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitLi | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitUl(Element ul) {
if ( converted.lastIndexOf( "\n" ) != converted.length() - 1 ) {
converted.append( '\n' );
}
for ( Node childNode : ul.childNodes() ) {
visitNode( childNode );
}
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitUl | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitSpan(Element span) {
// If it is a label for deprecation, let's make it bold to stand out:
boolean deprecatedLabel = span.hasClass( "deprecatedLabel" );
if ( deprecatedLabel ) {
converted.append( "**" );
}
for ( Node childNode : span.childNodes() ) {
visitNode( childNode );
}... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitSpan | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitLink(Element link) {
converted.append( "link:" )
.append( link.attr( "href" ) )
.append( '[' );
for ( Node childNode : link.childNodes() ) {
visitNode( childNode );
}
converted.append( ']' );
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitLink | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitTextNode(TextNode node) {
if ( converted.lastIndexOf( "+\n" ) == converted.length() - "+\n".length() ) {
// if it's a start of a paragraph - remove any leading spaces:
converted.append( ( node ).text().replaceAll( "^\\s+", "" ) );
}
else {
converted.append( ( node ).text() );
}... | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitTextNode | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
private void visitUnknownNode(Node node) {
// if we encounter a node that we are not handling - we want to fail as the result might be missing some details:
throw new IllegalStateException( "Unknown node: " + node );
} | Any ORM links will be relative, and we want to prepend them with the {@code publishedJavadocsUrl}
so that they are usable when the doc is published.
Any external links should have a {@code externalLink} or {@code external-link} CSS class, we want to keep them unchanged.
<p>
NOTE: this method modifies the parsed DOM. | visitUnknownNode | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/JavadocToAsciidocConverter.java | Apache-2.0 |
public static Map<SettingsDocSection, SortedSet<SettingDescriptor>> collectSettingDescriptors(
Directory javadocDirectory,
Map<String, SettingsDocSection> sections,
String publishedJavadocsUrl) {
return collectSettingDescriptors( javadocDirectory.getAsFile(), sections, publishedJavadocsUrl );
} | @author Marko Bekhta
@author Steve Ebersole | collectSettingDescriptors | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
public static Map<SettingsDocSection, SortedSet<SettingDescriptor>> collectSettingDescriptors(
File javadocDirectory,
Map<String, SettingsDocSection> sections,
String publishedJavadocsUrl) {
final Map<SettingsDocSection, SortedSet<SettingDescriptor>> result = Utils.createResultMap( sections );
// Load the... | @author Marko Bekhta
@author Steve Ebersole | collectSettingDescriptors | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
private static boolean isUselessJavadoc(Element fieldJavadocElement) {
return fieldJavadocElement.selectFirst( "div.block" ) == null;
} | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | isUselessJavadoc | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
private static void applyMetadata(SettingWorkingDetails settingDetails, Element fieldJavadocElement) {
processNotes(
fieldJavadocElement,
(name, content) -> {
switch ( name ) {
case "Default Value:": {
settingDetails.setDefaultValue( content );
break;
}
case "API Note:": {... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | applyMetadata | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
public static Document loadConstants(File javadocDirectory) {
try {
final File constantValuesFile = new File( javadocDirectory, "constant-values.html" );
return Jsoup.parse( constantValuesFile );
}
catch (IOException e) {
throw new IllegalStateException( "Unable to access javadocs `constant-values.html`"... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | loadConstants | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
private static SettingsDocSection findMatchingDocSection(
String className,
Map<String, SettingsDocSection> sections) {
for ( Map.Entry<String, SettingsDocSection> entry : sections.entrySet() ) {
if ( entry.getValue().getSettingsClassNames().contains( className ) ) {
return entry.getValue();
}
}
r... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | findMatchingDocSection | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
private static Map<String, Element> extractClassFieldJavadocs(String className, File javadocDirectory) {
final Map<String, Element> result = new HashMap<>();
final Document document = loadClassJavadoc( className, javadocDirectory );
final Elements fieldDetailSections = document.select( "section.detail" );
for ... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | extractClassFieldJavadocs | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
private static Document loadClassJavadoc(String enclosingClass, File javadocDirectory) {
final String classJavadocFileName = enclosingClass.replace( ".", File.separator ) + ".html";
final File classJavadocFile = new File( javadocDirectory, classJavadocFileName );
try {
return Jsoup.parse( classJavadocFile );
... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | loadClassJavadoc | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
private static String stripQuotes(String value) {
if ( value.startsWith( "\"" ) && value.endsWith( "\"" ) ) {
return value.substring( 1, value.length() - 1 );
}
return value;
} | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | stripQuotes | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
private static void processNotes(
Element fieldJavadocElement,
NoteConsumer noteConsumer) {
final Element notesElement = fieldJavadocElement.selectFirst( "dl.notes" );
if ( notesElement == null ) {
return;
}
// should be a list of alternating <dt/> and <dd/> elements.
final Elements notesChildren = ... | @param fieldJavadocElement The element to inspect if it has some valuable documentation.
@return {@code true} if no Javadoc was written for this field; {@code false} otherwise. | processNotes | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/properties/jdk17/SettingsCollector.java | Apache-2.0 |
@Override
public void apply(Project project) {
project.getPluginManager().apply( JdkVersionPlugin.class );
final JdkVersionConfig jdkVersionsConfig = project.getExtensions().getByType( JdkVersionConfig.class );
final JavaPluginExtension javaPluginExtension = project.getExtensions().getByType( JavaPluginExtensi... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | apply | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
private void configureCompileTask(JavaCompile compileTask, JavaLanguageVersion releaseVersion) {
final CompileOptions compileTaskOptions = compileTask.getOptions();
compileTaskOptions.getRelease().set( releaseVersion.asInt() );
// Needs add-opens because of https://github.com/gradle/gradle/issues/15538
addJvmAr... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | configureCompileTask | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
private void configureCompileTasks(Project project) {
project.getTasks().withType( JavaCompile.class ).configureEach( new Action<JavaCompile>() {
@Override
public void execute(JavaCompile compileTask) {
addJvmArgs( compileTask,
project.property( "toolchain.compiler.jvmargs" ).toString().split( " " )
... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | configureCompileTasks | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
@Override
public void execute(JavaCompile compileTask) {
addJvmArgs( compileTask,
project.property( "toolchain.compiler.jvmargs" ).toString().split( " " )
);
compileTask.doFirst(
new Action<Task>() {
@Override
public void execute(Task task) {
project.getLogger().lifecycl... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | execute | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
@Override
public void execute(Task task) {
project.getLogger().lifecycle(
"Compiling with '{}'",
compileTask.getJavaCompiler().get().getMetadata().getInstallationPath()
);
} | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | execute | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
private void configureTestTasks(Project project) {
project.getTasks().withType( Test.class ).configureEach( new Action<Test>() {
@Override
public void execute(Test testTask) {
testTask.jvmArgs(
Arrays.asList(
project.property( "toolchain.launcher.jvmargs" ).toString().split( " " )
)
... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | configureTestTasks | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
@Override
public void execute(Test testTask) {
testTask.jvmArgs(
Arrays.asList(
project.property( "toolchain.launcher.jvmargs" ).toString().split( " " )
)
);
if ( project.hasProperty( "test.jdk.launcher.args" ) ) {
testTask.jvmArgs(
Arrays.asList(
project.getProper... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | execute | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
@Override
public void execute(Task task) {
project.getLogger().lifecycle(
"Testing with '{}'",
testTask.getJavaLauncher().get().getMetadata().getInstallationPath()
);
} | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | execute | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
private void configureJavadocTasks(Project project, SourceSet mainSourceSet) {
project.getTasks().named( mainSourceSet.getJavadocTaskName(), Javadoc.class, (task) -> {
task.getOptions().setJFlags( javadocFlags( project ) );
task.doFirst( new Action<Task>() {
@Override
public void execute(Task t) {
... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | configureJavadocTasks | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
@Override
public void execute(Task t) {
project.getLogger().lifecycle(
"Generating javadoc with '{}'",
task.getJavadocTool().get().getMetadata().getInstallationPath()
);
} | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | execute | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
private static List<String> javadocFlags(Project project) {
final String jvmArgs = project.property( "toolchain.javadoc.jvmargs" ).toString();
final String[] splits = jvmArgs.split( " " );
return Arrays.asList( splits ).stream().filter( (split) -> !split.isEmpty() ).collect( Collectors.toList() );
} | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | javadocFlags | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
public static void addJvmArgs(JavaCompile compileTask, String ... newArgs) {
ForkOptions forOptions = compileTask
.getOptions()
.getForkOptions();
final List<String> mergedArgs = new ArrayList<>( forOptions.getJvmArgs() );
Collections.addAll( mergedArgs, newArgs );
forOptions.setJvmArgs( mergedArgs );
... | Retrieves JDK versions exposed by {@link JdkVersionPlugin}
and injects them in build tasks.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@author Steve Ebersole | addJvmArgs | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java | Apache-2.0 |
public boolean isExplicitlyConfigured() {
return explicit;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | isExplicitlyConfigured | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public boolean isExplicit() {
return explicit;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | isExplicit | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getBaseline() {
return baseline;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getBaseline | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public String getBaselineStr() {
return getBaseline().toString();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getBaselineStr | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getBaselineVersion() {
return getBaseline();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getBaselineVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getMin() {
return min;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMin | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public String getMinStr() {
return getMin().toString();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMinStr | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getMinVersion() {
return getMin();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMinVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getMax() {
return max;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMax | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public String getMaxStr() {
return getMax().toString();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMaxStr | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getMaxVersion() {
return getMax();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMaxVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public MainJdks getMain() {
return main;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMain | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public TestJdks getTest() {
return test;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getTest | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getMainCompilerVersion() {
return main.getCompiler();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMainCompilerVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getMainReleaseVersion() {
return main.getRelease();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getMainReleaseVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getTestCompilerVersion() {
return test.getCompiler();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getTestCompilerVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getTestReleaseVersion() {
return test.getRelease();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getTestReleaseVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getTestLauncherVersion() {
return test.getLauncher();
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getTestLauncherVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public Set<JavaLanguageVersion> getAllVersions() {
final HashSet<JavaLanguageVersion> versions = new HashSet<>();
versions.add( getMainCompilerVersion() );
versions.add( getMainReleaseVersion() );
versions.add( getTestCompilerVersion() );
versions.add( getTestReleaseVersion() );
versions.add( getTestLaunche... | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getAllVersions | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
@NotNull
public static JdkVersionConfig createVersionConfig(
JavaLanguageVersion explicitMainVersion,
JavaLanguageVersion explicitTestVersion,
JavaLanguageVersion gradleJdkVersion,
JavaLanguageVersion baselineJdkVersion,
JavaLanguageVersion minSupportedJdkVersion,
JavaLanguageVersion maxSupportedJdkV... | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | createVersionConfig | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public static JavaLanguageVersion extractVersion(Settings settings, String propertyName) {
final StartParameter startParameters = settings.getGradle().getStartParameter();
final String projectProp = startParameters.getProjectProperties().get( propertyName );
if ( projectProp != null ) {
return JavaLanguageVers... | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | extractVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public static JavaLanguageVersion extractVersion(Project project, String propertyName) {
final Object projectProp = project.getProperties().get( propertyName );
if ( projectProp != null ) {
return JavaLanguageVersion.of( projectProp.toString() );
}
final Object sysProp = System.getProperties().get( property... | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | extractVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getCompiler() {
return compilerVersion;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getCompiler | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
@Override
public JavaLanguageVersion getRelease() {
return releaseVersion;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getRelease | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
@Override
public String toString() {
return "[compiler: " + compilerVersion + ", release:" + releaseVersion + "]";
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | toString | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
@Override
public JavaLanguageVersion getCompiler() {
return compilerVersion;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getCompiler | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
@Override
public JavaLanguageVersion getRelease() {
return releaseVersion;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getRelease | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
public JavaLanguageVersion getLauncher() {
return launcherVersion;
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getLauncher | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
@Override
public String toString() {
return "[compiler: " + compilerVersion + ", release:" + releaseVersion + ", launcher: " + launcherVersion + "]";
} | Describes the JDK versions of interest to the Hibernate build
@see JdkVersionSettingsPlugin
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | toString | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java | Apache-2.0 |
@Override
public void apply(Project project) {
final JavaLanguageVersion explicitMainVersion = extractVersion( project, MAIN_JDK_VERSION );
final JavaLanguageVersion explicitTestVersion = extractVersion( project, TEST_JDK_VERSION );
final JavaLanguageVersion gradleJdkVersion = JavaLanguageVersion.of( JavaVersio... | Gathers JDK versions of interest from settings and exposes them to later phases of the build
than {@link JdkVersionSettingsPlugin}.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JavaModulePlugin
@author Steve Ebersole | apply | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionPlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionPlugin.java | Apache-2.0 |
@NotNull
private static JavaLanguageVersion getJavaLanguageVersion(VersionCatalog jdks, String entryName) {
final VersionConstraint versionConstraint = jdks.findVersion( entryName ).orElseThrow();
return JavaLanguageVersion.of( versionConstraint.getRequiredVersion() );
} | Gathers JDK versions of interest from settings and exposes them to later phases of the build
than {@link JdkVersionSettingsPlugin}.
@see JdkVersionConfig
@see JdkVersionSettingsPlugin
@see JavaModulePlugin
@author Steve Ebersole | getJavaLanguageVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionPlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionPlugin.java | Apache-2.0 |
@Override
public void apply(Settings settings) {
final JavaLanguageVersion explicitMainVersion = extractVersion( settings, MAIN_JDK_VERSION );
final JavaLanguageVersion explicitTestVersion = extractVersion( settings, TEST_JDK_VERSION );
final JavaLanguageVersion gradleJdkVersion = JavaLanguageVersion.of( JavaVe... | Gathers JDK versions of interest from settings and exposes them to earlier phases of the build
than {@link JdkVersionPlugin}.
@see JdkVersionConfig
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | apply | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionSettingsPlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionSettingsPlugin.java | Apache-2.0 |
@Override
public void execute(Gradle gradle) {
final String implicitExplicitString = jdkVersionConfig.isExplicit() ? "explicit" : "implicit";
System.out.println(
"Java versions for main code: " + jdkVersionConfig.getMain()
+ " (" + implicitExplicitString + ")"
);
System.out.println(
... | Gathers JDK versions of interest from settings and exposes them to earlier phases of the build
than {@link JdkVersionPlugin}.
@see JdkVersionConfig
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | execute | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionSettingsPlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionSettingsPlugin.java | Apache-2.0 |
@NotNull
private JavaLanguageVersion getJavaLanguageVersion(Settings settings, String name) {
final StartParameter startParameter = settings.getStartParameter();
final String fromSysProp = startParameter.getSystemPropertiesArgs().get( name );
if ( fromSysProp != null && !fromSysProp.isEmpty() ) {
return JavaL... | Gathers JDK versions of interest from settings and exposes them to earlier phases of the build
than {@link JdkVersionPlugin}.
@see JdkVersionConfig
@see JdkVersionPlugin
@see JavaModulePlugin
@author Steve Ebersole | getJavaLanguageVersion | java | hibernate/hibernate-orm | local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionSettingsPlugin.java | https://github.com/hibernate/hibernate-orm/blob/master/local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionSettingsPlugin.java | Apache-2.0 |
public void addFileset(FileSet set) {
this.filesets.add( set );
} | Ant task for performing build-time enhancement of entity objects.
Code based on from:
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61b88ba91eec82cac044e1c/hibernate-core/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61... | addFileset | java | hibernate/hibernate-orm | tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | https://github.com/hibernate/hibernate-orm/blob/master/tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | Apache-2.0 |
public void setBase(String base) {
this.base = base;
} | Ant task for performing build-time enhancement of entity objects.
Code based on from:
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61b88ba91eec82cac044e1c/hibernate-core/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61... | setBase | java | hibernate/hibernate-orm | tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | https://github.com/hibernate/hibernate-orm/blob/master/tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | Apache-2.0 |
public void setDir(String dir) {
this.dir = dir;
} | Ant task for performing build-time enhancement of entity objects.
Code based on from:
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61b88ba91eec82cac044e1c/hibernate-core/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61... | setDir | java | hibernate/hibernate-orm | tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | https://github.com/hibernate/hibernate-orm/blob/master/tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | Apache-2.0 |
public void setFailOnError(boolean failOnError) {
this.failOnError = failOnError;
} | Ant task for performing build-time enhancement of entity objects.
Code based on from:
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61b88ba91eec82cac044e1c/hibernate-core/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61... | setFailOnError | java | hibernate/hibernate-orm | tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | https://github.com/hibernate/hibernate-orm/blob/master/tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | Apache-2.0 |
public void setEnableLazyInitialization(boolean enableLazyInitialization) {
this.enableLazyInitialization = enableLazyInitialization;
} | Ant task for performing build-time enhancement of entity objects.
Code based on from:
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61b88ba91eec82cac044e1c/hibernate-core/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java
https://github.com/hibernate/hibernate-orm/blob/159bc99a36d86988b61... | setEnableLazyInitialization | java | hibernate/hibernate-orm | tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | https://github.com/hibernate/hibernate-orm/blob/master/tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.