mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-25 09:54:24 +00:00
Show the javadoc some love and a bit of a facelift, improve some docs
Closes #457, closes #446
This commit is contained in:
1 parent
ef6422f26e
commit
c1aec0fb49
67 files changed
+2406
-161
No files matched your search
@@ -1,7 +1,7 @@
|
||||
|
||||
### [](http://ci.liteloader.com/view/Other/job/Mixin/lastSuccessfulBuild/)
|
||||
|
||||

|
||||

|
||||
|
||||
**Mixin** is a trait/mixin framework for Java using [ASM](http://asm.ow2.org/)
|
||||
and hooking into the runtime class-loading process via Mojang's
|
||||
|
||||
@@ -94,6 +94,8 @@ sourceSets {
|
||||
}
|
||||
launchwrapper {
|
||||
compileClasspath += main.output
|
||||
sourceCompatibility = '1.8'
|
||||
targetCompatibility = '1.8'
|
||||
}
|
||||
modlauncher {
|
||||
compileClasspath += main.output
|
||||
@@ -170,7 +172,23 @@ dependencies {
|
||||
}
|
||||
|
||||
javadoc {
|
||||
exclude '**/throwables'
|
||||
classpath += sourceSets.legacy.output
|
||||
source sourceSets.ap.allJava
|
||||
exclude {
|
||||
it.relativePath.file && it.relativePath.pathString =~ 'tools' && !(it.name =~ /SuppressedBy|package-info/) }
|
||||
options {
|
||||
docTitle 'Welcome to the Mixin Javadoc'
|
||||
overview 'docs/javadoc/overview.html'
|
||||
stylesheetFile file('docs/javadoc/mixin.css')
|
||||
addBooleanOption '-allow-script-in-comments', true
|
||||
}
|
||||
doLast {
|
||||
copy {
|
||||
from 'docs/javadoc/resources'
|
||||
into outputDirectory
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Eclipse
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
@import url('jdk8_stylesheet.css');
|
||||
|
||||
/* Montserrat font, for sponge style */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900');
|
||||
|
||||
span.summary {
|
||||
clear: both;
|
||||
display: block;
|
||||
}
|
||||
|
||||
span.summary.p {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
span.summary hr {
|
||||
color: transparent;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.subTitle .block .summary {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
.tableSubHeadingColor {
|
||||
background-color:#EEEEFF;
|
||||
}
|
||||
.altColor, .rowColor {
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
|
||||
/* altColor and rowColor get screwed up by hidden classes so just use css */
|
||||
tr.altColor:nth-child(even), tr.rowColor:nth-child(even) {
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
sup {
|
||||
font-size:8px;
|
||||
}
|
||||
|
||||
tt {
|
||||
color: #6c4e0b;
|
||||
}
|
||||
|
||||
code i, dt i {
|
||||
color: #996c0c;
|
||||
}
|
||||
|
||||
a:link, a:visited, code b {
|
||||
color: #c79015;
|
||||
}
|
||||
|
||||
a:hover, a:focus, a:active, code em {
|
||||
color: #e8aa21;
|
||||
}
|
||||
|
||||
code b, code em, code i, dt i {
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
ins {
|
||||
background-color: #ffd26d;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
del {
|
||||
color: #AAA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
table.infoTable {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.infoTable td, table.infoTable th, table.cellTable td, table.cellTable th {
|
||||
padding: 6px 8px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
table.cellTable th, table.cellTable td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.infoTable th, table.cellTable th, table.infoTable td.th, table.cellTable td.th {
|
||||
background-color: #CCC;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a[name] {
|
||||
color: #353833;
|
||||
}
|
||||
|
||||
a[name]:hover {
|
||||
text-decoration:none;
|
||||
color: #353833;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
body, div.block {
|
||||
font-family: Tahoma, sans-serif, sans;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.indexContainer,
|
||||
td.colFirst, th.colFirst, td.colLast, th.colLast, td.colOne, th.colOne,
|
||||
.indexHeader h1, .header ul li, .footer ul li {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.indexHeader span {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.indexHeader h1 {
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
.indexContainer h2 {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
|
||||
.bar {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.tab {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.topNav, .bottomNav, .bar {
|
||||
color: #FFFFFF;
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
.topNav, .bottomNav {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
|
||||
.subNav {
|
||||
background-color: #CCC;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.navBarCell1Rev {
|
||||
background-color: #e8aa21;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.header ul li, .footer ul li {
|
||||
font-size:13px;
|
||||
}
|
||||
.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
|
||||
.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
|
||||
background-color: #e8aa21;
|
||||
padding: 6px 12px;
|
||||
height: auto;
|
||||
font-family: Montserrat;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.memberSummary caption span.activeTableTab span {
|
||||
background-color: #e8aa21;
|
||||
padding: 6px 12px;
|
||||
height: auto;
|
||||
border-bottom: 2px solid #e8aa21;
|
||||
}
|
||||
|
||||
.memberSummary caption span.tableTab span {
|
||||
background-color: #666;
|
||||
padding: 6px 12px;
|
||||
height: auto;
|
||||
border-bottom: 2px solid white;
|
||||
}
|
||||
|
||||
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.title, h1, h2, h3, h4, h5, h6, .h1 {
|
||||
font-family: 'Montserrat';
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 700;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
h1.overviewTitle, .header img {
|
||||
margin: 32px 0 0 0;
|
||||
}
|
||||
|
||||
h1, .h1 {
|
||||
font-weight: bold;
|
||||
font-size: 45px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
h1.title, .summary.h1 {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
pre, code, tt, dt code, table tr td dt code {
|
||||
font-family: 'Consolas', monospace;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.contentContainer .description .block dl dt {
|
||||
background: #CCC;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||
font-family: Tahoma, sans-serif, sans;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.contentContainer .description .block dl dd {
|
||||
background: #F0F0F0;
|
||||
margin: -6px 0 0 40px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4, ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
background-color: #CCC;
|
||||
border: 0;
|
||||
margin: 0 0 6px -8px;
|
||||
padding: 9px 12px;
|
||||
}
|
||||
|
||||
th.colFirst, th.colLast, th.colOne, .constantsSummary th {
|
||||
background: #CCC;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
background-color: #F5F5F5;
|
||||
padding: 12px 40px;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
blockquote pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||
padding-top: 1px;
|
||||
border: 0;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<body>
|
||||
<p class="summary">
|
||||
<b>Mixin</b> is a trait/mixin framework for Java using
|
||||
<a target="_top" href="http://asm.ow2.org/">ASM</a> and hooking into
|
||||
the runtime class-loading process via Mojang's
|
||||
<a target="_top" href="https://github.com/Mojang/LegacyLauncher">
|
||||
LegacyLauncher</a> system. The main documentation for <b>Mixin</b> can
|
||||
be found in the
|
||||
<a target="_top" href="https://github.com/SpongePowered/Mixin/wiki">
|
||||
Wiki</a>.
|
||||
</p>
|
||||
|
||||
<p id="description">
|
||||
This Javadoc contains documentation for individual features and
|
||||
annotations. For additional help use the channel
|
||||
<a target="_blank" href="https://discord.gg/tBcwxz2"><code>#mixin</code>
|
||||
on the Sponge Discord Server</a>.
|
||||
</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Insert mixin logo
|
||||
let titleNode = document.querySelector('h1.title');
|
||||
let logoImg = document.createElement('IMG');
|
||||
logoImg.src = 'logo.png';
|
||||
logoImg.title = 'SpongePowered MIXIN';
|
||||
titleNode.parentElement.insertBefore(logoImg, titleNode);
|
||||
|
||||
// Make sure we get the correct block
|
||||
let summaryBlock = document.querySelector(".contentContainer .block .summary").parentElement;
|
||||
let headerBlock = document.querySelector(".subTitle .block");
|
||||
headerBlock.innerHTML = summaryBlock.innerHTML;
|
||||
document.querySelector(".subTitle").nextElementSibling.remove();
|
||||
summaryBlock.remove();
|
||||
|
||||
titleNode.classList.add('overviewTitle');
|
||||
</script>
|
||||
</body>
|
||||
@@ -0,0 +1,574 @@
|
||||
/* Javadoc style sheet */
|
||||
/*
|
||||
Overall document style
|
||||
*/
|
||||
|
||||
@import url('resources/fonts/dejavu.css');
|
||||
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size:14px;
|
||||
margin:0;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a:active {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
a[name]:hover {
|
||||
text-decoration:none;
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
}
|
||||
h1 {
|
||||
font-size:20px;
|
||||
}
|
||||
h2 {
|
||||
font-size:18px;
|
||||
}
|
||||
h3 {
|
||||
font-size:16px;
|
||||
font-style:italic;
|
||||
}
|
||||
h4 {
|
||||
font-size:13px;
|
||||
}
|
||||
h5 {
|
||||
font-size:12px;
|
||||
}
|
||||
h6 {
|
||||
font-size:11px;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
margin-top:8px;
|
||||
line-height:1.4em;
|
||||
}
|
||||
dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
}
|
||||
table tr td dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
vertical-align:top;
|
||||
padding-top:4px;
|
||||
}
|
||||
sup {
|
||||
font-size:8px;
|
||||
}
|
||||
/*
|
||||
Document title and Copyright styles
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.aboutLanguage {
|
||||
float:right;
|
||||
padding:0px 21px;
|
||||
font-size:11px;
|
||||
z-index:200;
|
||||
margin-top:-9px;
|
||||
}
|
||||
.legalCopy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.bar a:hover, .bar a:focus {
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
Navigation bar styles
|
||||
*/
|
||||
.bar {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
padding:.8em .5em .4em .8em;
|
||||
height:auto;/*height:1.8em;*/
|
||||
font-size:11px;
|
||||
margin:0;
|
||||
}
|
||||
.topNav {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.bottomNav {
|
||||
margin-top:10px;
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.subNav {
|
||||
background-color:#dee3e9;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.subNav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
ul.navList, ul.subNavList {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.navList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding: 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
ul.subNavList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
}
|
||||
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.topNav a:hover, .bottomNav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.navBarCell1Rev {
|
||||
background-color:#F8981D;
|
||||
color:#253441;
|
||||
margin: auto 5px;
|
||||
}
|
||||
.skipNav {
|
||||
position:absolute;
|
||||
top:auto;
|
||||
left:-9999px;
|
||||
overflow:hidden;
|
||||
}
|
||||
/*
|
||||
Page header and footer styles
|
||||
*/
|
||||
.header, .footer {
|
||||
clear:both;
|
||||
margin:0 20px;
|
||||
padding:5px 0 0 0;
|
||||
}
|
||||
.indexHeader {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
}
|
||||
.indexHeader span{
|
||||
margin-right:15px;
|
||||
}
|
||||
.indexHeader h1 {
|
||||
font-size:13px;
|
||||
}
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.subTitle {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 15px 0;
|
||||
padding:0;
|
||||
}
|
||||
.footer ul {
|
||||
margin:20px 0 5px 0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:13px;
|
||||
}
|
||||
/*
|
||||
Heading styles
|
||||
*/
|
||||
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList h3 {
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
ul.blockList li.blockList h2 {
|
||||
padding:0px 0 20px 0;
|
||||
}
|
||||
/*
|
||||
Page layout container styles
|
||||
*/
|
||||
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
.indexContainer {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
font-size:12px;
|
||||
}
|
||||
.indexContainer h2 {
|
||||
font-size:13px;
|
||||
padding:0 0 3px 0;
|
||||
}
|
||||
.indexContainer ul {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.indexContainer ul li {
|
||||
list-style:none;
|
||||
padding-top:2px;
|
||||
}
|
||||
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||
font-size:12px;
|
||||
font-weight:bold;
|
||||
margin:10px 0 0 0;
|
||||
color:#4E4E4E;
|
||||
}
|
||||
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||
margin:5px 0 10px 0px;
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Sans Mono',monospace;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dt {
|
||||
margin-left:1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dd {
|
||||
margin:0 0 0 1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
List styles
|
||||
*/
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
font-size:0.9em;
|
||||
}
|
||||
ul.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
ul.inheritance li {
|
||||
display:inline;
|
||||
list-style:none;
|
||||
}
|
||||
ul.inheritance li ul.inheritance {
|
||||
margin-left:15px;
|
||||
padding-left:15px;
|
||||
padding-top:1px;
|
||||
}
|
||||
ul.blockList, ul.blockListLast {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.blockList li.blockList, ul.blockListLast li.blockList {
|
||||
list-style:none;
|
||||
margin-bottom:15px;
|
||||
line-height:1.4;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0px 20px 5px 10px;
|
||||
border:1px solid #ededed;
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
padding-bottom:15px;
|
||||
border:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
|
||||
list-style:none;
|
||||
border-bottom:none;
|
||||
padding-bottom:0;
|
||||
}
|
||||
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
/*
|
||||
Table styles
|
||||
*/
|
||||
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
|
||||
width:100%;
|
||||
border-left:1px solid #EEE;
|
||||
border-right:1px solid #EEE;
|
||||
border-bottom:1px solid #EEE;
|
||||
}
|
||||
.overviewSummary, .memberSummary {
|
||||
padding:0px;
|
||||
}
|
||||
.overviewSummary caption, .memberSummary caption, .typeSummary caption,
|
||||
.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#253441;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0px;
|
||||
padding-top:10px;
|
||||
padding-left:1px;
|
||||
margin:0px;
|
||||
white-space:pre;
|
||||
}
|
||||
.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
|
||||
.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
|
||||
.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
|
||||
.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
|
||||
.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
|
||||
.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
|
||||
.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
|
||||
.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
|
||||
.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
padding-bottom:7px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
border: none;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.activeTableTab span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
margin-right:3px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.tableTab span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
margin-right:3px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#4D7A97;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
|
||||
padding-top:0px;
|
||||
padding-left:0px;
|
||||
padding-right:0px;
|
||||
background-image:none;
|
||||
float:none;
|
||||
display:inline;
|
||||
}
|
||||
.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
|
||||
.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
position:relative;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
}
|
||||
.memberSummary .activeTableTab .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
margin-right:3px;
|
||||
position:relative;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
}
|
||||
.memberSummary .tableTab .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
margin-right:3px;
|
||||
position:relative;
|
||||
background-color:#4D7A97;
|
||||
float:left;
|
||||
|
||||
}
|
||||
.overviewSummary td, .memberSummary td, .typeSummary td,
|
||||
.useSummary td, .constantsSummary td, .deprecatedSummary td {
|
||||
text-align:left;
|
||||
padding:0px 0px 12px 10px;
|
||||
}
|
||||
th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
|
||||
td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
|
||||
vertical-align:top;
|
||||
padding-right:0px;
|
||||
padding-top:8px;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
th.colFirst, th.colLast, th.colOne, .constantsSummary th {
|
||||
background:#dee3e9;
|
||||
text-align:left;
|
||||
padding:8px 3px 3px 7px;
|
||||
}
|
||||
td.colFirst, th.colFirst {
|
||||
white-space:nowrap;
|
||||
font-size:13px;
|
||||
}
|
||||
td.colLast, th.colLast {
|
||||
font-size:13px;
|
||||
}
|
||||
td.colOne, th.colOne {
|
||||
font-size:13px;
|
||||
}
|
||||
.overviewSummary td.colFirst, .overviewSummary th.colFirst,
|
||||
.useSummary td.colFirst, .useSummary th.colFirst,
|
||||
.overviewSummary td.colOne, .overviewSummary th.colOne,
|
||||
.memberSummary td.colFirst, .memberSummary th.colFirst,
|
||||
.memberSummary td.colOne, .memberSummary th.colOne,
|
||||
.typeSummary td.colFirst{
|
||||
width:25%;
|
||||
vertical-align:top;
|
||||
}
|
||||
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
|
||||
font-weight:bold;
|
||||
}
|
||||
.tableSubHeadingColor {
|
||||
background-color:#EEEEFF;
|
||||
}
|
||||
.altColor {
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
.rowColor {
|
||||
background-color:#EEEEEF;
|
||||
}
|
||||
/*
|
||||
Content styles
|
||||
*/
|
||||
.description pre {
|
||||
margin-top:0;
|
||||
}
|
||||
.deprecatedContent {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
.docSummary {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
div.block {
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
td.colLast div {
|
||||
padding-top:0px;
|
||||
}
|
||||
|
||||
|
||||
td.colLast a {
|
||||
padding-bottom:3px;
|
||||
}
|
||||
/*
|
||||
Formatting effect styles
|
||||
*/
|
||||
.sourceLineNo {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
font-size:10px;
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:3px 10px 2px 0px;
|
||||
color:#474747;
|
||||
}
|
||||
.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
|
||||
.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
|
||||
.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
|
||||
font-weight:bold;
|
||||
}
|
||||
.deprecationComment, .emphasizedPhrase, .interfaceName {
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
|
||||
div.block div.block span.interfaceName {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
div.contentContainer ul.blockList li.blockList h2{
|
||||
padding-bottom:0px;
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -24,6 +24,8 @@
|
||||
*/
|
||||
package org.spongepowered.tools.obfuscation;
|
||||
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
/**
|
||||
* A centralised list of tokens supported by the AP for use in
|
||||
* {@link SuppressWarnings} annotations. Collected here mainly for
|
||||
@@ -33,52 +35,79 @@ public enum SuppressedBy {
|
||||
|
||||
/**
|
||||
* Suppress warnings for constraint violations
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'constraints'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
CONSTRAINTS("constraints"),
|
||||
|
||||
/**
|
||||
* Suppress warnings about overwrite visibility upgrading/downgrading target
|
||||
* visibility
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'visibility'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
VISIBILITY("visibility"),
|
||||
|
||||
/**
|
||||
* Suppress warnings when an injector target cannot be found
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'target'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
TARGET("target"),
|
||||
|
||||
/**
|
||||
* Suppress warnings when a class, method or field mapping cannot be located
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'mapping'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
MAPPING("mapping"),
|
||||
|
||||
/**
|
||||
* Suppress warnings for when an <tt>@Overwrite</tt> method is missing
|
||||
* javadoc, or author or reason tags
|
||||
* Suppress warnings for when an {@link Overwrite @Overwrite} method is
|
||||
* missing javadoc, or author or reason tags
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'overwrite'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
OVERWRITE("overwrite"),
|
||||
|
||||
/**
|
||||
* Suppress warnings when a mixin target specified by name is located in the
|
||||
* default package
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'default-package'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
DEFAULT_PACKAGE("default-package"),
|
||||
|
||||
/**
|
||||
* Suppress warnings when a mixin target is resolved by the AP as visible
|
||||
* but cannot be referenced with a class literal for some reason
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'public-target'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
PUBLIC_TARGET("public-target"),
|
||||
|
||||
/**
|
||||
* Suppress warning when a mixin target is resolved by the AP as imaginary
|
||||
* (unresolvable via Mirror at compile time). For example for anonymous
|
||||
* inner classes or other synthetic member classes.
|
||||
* Suppress warning when a mixin target is resolved by the AP as imaginary
|
||||
* (unresolvable via Mirror at compile time), for example for anonymous
|
||||
* inner classes or other synthetic member classes
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'unresolvable-target'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
UNRESOLVABLE_TARGET("unresolvable-target"),
|
||||
|
||||
/**
|
||||
* The default java "raw types" suppressions
|
||||
* <div class="example">Usage:
|
||||
* <code><b>@SuppressWarnings(<i>'rawtypes'</i>)</b></code>
|
||||
* </div>
|
||||
*/
|
||||
RAW_TYPES("rawtypes");
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base package for the Mixin Annotation Processor.
|
||||
*/
|
||||
package org.spongepowered.tools.obfuscation;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Classes which support environment-agnostic launch logic for the Mixin
|
||||
* subsystem and base classes and interfaces for environment-specific adapters.
|
||||
*/
|
||||
package org.spongepowered.asm.launch;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Default (platform-agnostic) container handles
|
||||
*/
|
||||
package org.spongepowered.asm.launch.platform.container;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base classes for environment-specific adapters and default platform-agnostic
|
||||
* handlers for environment and mixin containers.
|
||||
*/
|
||||
package org.spongepowered.asm.launch.platform;
|
||||
@@ -31,7 +31,13 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Pseudo-implements decorator for Mixins with conflicting methods in a
|
||||
* superclass to soft-implement an interface
|
||||
* superclass to soft-implement an interface.
|
||||
*
|
||||
* <p>See <a target="_top"
|
||||
* href="https://github.com/SpongePowered/Mixin/wiki/Introduction-to-Mixins -
|
||||
* Resolving-Method-Signature-Conflicts">Introduction to Mixins - Resolving
|
||||
* Method Signature Conflicts</a> for details on soft implementation of
|
||||
* interfaces.</p>
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
|
||||
@@ -46,10 +46,10 @@ import java.lang.annotation.Target;
|
||||
* <p>Consider the following code:</p>
|
||||
*
|
||||
* <blockquote><pre>@Shadow public int getSomething();
|
||||
*
|
||||
* public int soft$getSomething() {
|
||||
* return this.getSomething();
|
||||
* }</pre></blockquote>
|
||||
*
|
||||
*public int soft$getSomething() {
|
||||
* return this.getSomething();
|
||||
*}</pre></blockquote>
|
||||
*
|
||||
* <p>This type of accessor is common when an interface conflict occurs, but has
|
||||
* the problem that the injected accessor will be effectively self-referential
|
||||
@@ -61,9 +61,9 @@ import java.lang.annotation.Target;
|
||||
*
|
||||
* <blockquote><pre>@Shadow private int something;
|
||||
*
|
||||
* public int soft$getSomething() {
|
||||
* return this.something;
|
||||
* }</pre></blockquote>
|
||||
*public int soft$getSomething() {
|
||||
* return this.something;
|
||||
*}</pre></blockquote>
|
||||
*
|
||||
* <p>But this has the drawback of forcing the mixin to re-implement the target
|
||||
* method, and thus forces ongoing maintenance of the mixin to include updating
|
||||
@@ -75,21 +75,21 @@ import java.lang.annotation.Target;
|
||||
* accessor with {@link Intrinsic @Intrinsic}:</p>
|
||||
*
|
||||
* <blockquote><pre>@Shadow public int getSomething();
|
||||
*
|
||||
* @Intrinsic // don't merge the method if the target already exists
|
||||
* public int soft$getSomething() {
|
||||
* return this.getSomething();
|
||||
* }</pre></blockquote>
|
||||
*
|
||||
*@Intrinsic <del>// don't merge the method if the target already exists
|
||||
*</del>public int soft$getSomething() {
|
||||
* return this.getSomething();
|
||||
*}</pre></blockquote>
|
||||
*
|
||||
* <p>This is ideal if the accessor is simply providing a proxy through to an
|
||||
* underlying obfuscated method, as in the example above. However, if the new
|
||||
* method contains additional code, such as in this example:</p>
|
||||
*
|
||||
* <blockquote><pre>@Shadow public int getSomething();
|
||||
*
|
||||
* public int soft$getSomething() {
|
||||
* return this.someCondition ? this.someOtherValue : this.getSomething();
|
||||
* }</pre></blockquote>
|
||||
*
|
||||
*public int soft$getSomething() {
|
||||
* return this.someCondition ? this.someOtherValue : this.getSomething();
|
||||
*}</pre></blockquote>
|
||||
*
|
||||
* <p>Then we still have the original problem that the method becomes re-entrant
|
||||
* without specifying the additional Overwrite. We can solve this with the
|
||||
@@ -108,11 +108,11 @@ import java.lang.annotation.Target;
|
||||
* accessor will call the overwritten method.</p>
|
||||
*
|
||||
* <blockquote><pre>@Shadow public int getSomething();
|
||||
*
|
||||
* @Intrinsic(displace = true) // if the target already exists, displace it
|
||||
* public int soft$getSomething() {
|
||||
* return this.someCondition ? this.someOtherValue : this.getSomething();
|
||||
* }</pre></blockquote>
|
||||
*
|
||||
*@Intrinsic(displace = true) // if the target already exists, displace it
|
||||
*public int soft$getSomething() {
|
||||
* return this.someCondition ? this.someOtherValue : this.getSomething();
|
||||
*}</pre></blockquote>
|
||||
*
|
||||
*/
|
||||
@Target({ ElementType.METHOD })
|
||||
|
||||
@@ -30,7 +30,22 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Decorator for mixin classes
|
||||
* The main decorator for mixin classes, this annotation denotes a class as a
|
||||
* mixin and specifies two key attributes:
|
||||
*
|
||||
* <dl>
|
||||
* <dt>The target classes</dt>
|
||||
* <dd>Every mixin requires at least one target class in order to be valid.
|
||||
* The target classes should be specified via {@link #value} where possible
|
||||
* using class literals. However for anonymous inner classes,
|
||||
* package-private classes, or unavailable classes (eg. synthetic classes)
|
||||
* being targetted via {@link Pseudo @Pseudo}, the targets should be
|
||||
* specified via the {@link #targets} instead.</dd>
|
||||
* <dt>The priority</dt>
|
||||
* <dd>The mixin {@link #priority} is used to express the mixin's desired
|
||||
* ordering with respect to other mixins being applied to the same target
|
||||
* class.</dd>
|
||||
* </dl>
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@@ -46,18 +61,34 @@ public @interface Mixin {
|
||||
/**
|
||||
* Since specifying targets in {@link #value} requires that the classes be
|
||||
* publicly visible, this property is provided to allow package-private,
|
||||
* anonymous innner, and private inner classes to be referenced. Referencing
|
||||
* an otherwise public class using this property is an error condition and
|
||||
* will throw an exception at runtime. It is completely fine to specify both
|
||||
* public and private targets for the same mixin however.
|
||||
* anonymous innner, and private inner, or unavailable ({@link Pseudo
|
||||
* @Pseudo} classes to be referenced. Referencing an otherwise public
|
||||
* class using this property is an error condition and will raise a warning
|
||||
* at runtime or an error if {@link MixinEnvironment.Option#DEBUG_STRICT
|
||||
* strict checks} are enabled. It is completely fine to specify both publi
|
||||
* and private targets for the same mixin however.
|
||||
*
|
||||
* <p>Note that unlike class literals specified in {@link #value}, imports
|
||||
* are not supported and therefore the class specified here must be
|
||||
* fully-qualified with the package name.</p>
|
||||
*
|
||||
* @return protected or package-private classes this mixin targets
|
||||
* @return protected, package-private, or {@link Pseudo pseudo} classes this
|
||||
* mixin targets
|
||||
*/
|
||||
public String[] targets() default { };
|
||||
|
||||
/**
|
||||
* Priority for the mixin, relative to other mixins targetting the same
|
||||
* classes
|
||||
* classes. By default mixins inherit their priority from the parent
|
||||
* configuration that contains them, setting this value allows the priority
|
||||
* to be overridden on a per-mixin basis.
|
||||
*
|
||||
* <p>Priorities sort mixins into <em>natural order</em> with lower priority
|
||||
* mixins being applied first. This changes the nature of priority based on
|
||||
* your intentions. Especially with respect to injectors, which must be
|
||||
* considered on a case-by-case basis since the semantics of priority vary
|
||||
* by injector because of first-come-first-served versus implied ordering of
|
||||
* injectors such as inject-at-HEAD.</p>
|
||||
*
|
||||
* @return the mixin priority (relative to other mixins targetting the same
|
||||
* class)
|
||||
@@ -66,7 +97,7 @@ public @interface Mixin {
|
||||
|
||||
/**
|
||||
* By default, the annotation processor will attempt to locate an
|
||||
* obfuscation mapping for all {@link Shadow} and
|
||||
* obfuscation mapping for all {@link Overwrite}, {@link Shadow} and
|
||||
* {@link org.spongepowered.asm.mixin.injection.Inject} annotated members
|
||||
* since it is anticipated that in general the target of a {@link Mixin}
|
||||
* will be an obfuscated class and all annotated members will need to be
|
||||
@@ -84,4 +115,5 @@ public @interface Mixin {
|
||||
* obfuscation mappings for this annotation (default true).
|
||||
*/
|
||||
public boolean remap() default true;
|
||||
|
||||
}
|
||||
@@ -30,23 +30,38 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* A Mixin marked as <b>Pseudo</b> is allowed to target classes which are not
|
||||
* available at compile time and may not be available at runtime. This means
|
||||
* that certain restrictions apply:
|
||||
* A Mixin marked as <tt>@Pseudo</tt> is allowed to target classes which are
|
||||
* not available at <em>compile time</em> and may not be available at runtime.
|
||||
* This can be used in situations where - for one reason or another - a target
|
||||
* class is not available to a project being compiled and would therefore fail
|
||||
* AP verification. The target class is simulated by the AP using knowledge of
|
||||
* only the superclass of the target (or at least, any <em>available</em> known
|
||||
* superclass of the target. This means that certain restrictions apply:
|
||||
*
|
||||
* <p>In particular, the superclass requirement for pseudo mixins is extremely
|
||||
* important if the target has an obfuscated class in its hierarchy. For example
|
||||
* let's assume that we're mixing into a class <tt>SomeCustomScreen</tt> from
|
||||
* another party which extends <tt>GuiScreen</tt> which is obfuscated.
|
||||
* Attempting to inject into <tt>initGui</tt> will succeed at dev time and fail
|
||||
* at production time, because the reference is obfuscated. We can overcome this
|
||||
* by ensuring the mixin inherits from the same superclass, thus allowing
|
||||
* <tt>initGui</tt> to be resolved in the superclass hierarchy (this is not the
|
||||
* case for normal mixins).</p>
|
||||
* <p>The superclass requirement for pseudo mixins is extremely important <b>if
|
||||
* the target has an obfuscated class in its hierarchy</b>. For example
|
||||
* let's assume that we're mixing into a class <tt>CustomGuiScreen</tt> from
|
||||
* another party which extends <tt>GuiScreen</tt>, where <tt>GuiScreen</tt> is
|
||||
* an obfuscated class. <tt>GuiScreen</tt> contains an obfuscated method
|
||||
* <tt>initGui</tt> which the (@Pseudo) target class overrides. Attempting
|
||||
* to inject into <tt>initGui</tt> would succeed at dev time but would fail
|
||||
* at production time, because the reference is obfuscated. Normally when a
|
||||
* target overrides an obfuscated method in this way, the AP can resolve the
|
||||
* obfuscation by walking the superclass hierarchy of the target in order to
|
||||
* discover a mapping. However when the target is not available at compile time
|
||||
* the AP cannot do this and must rely on only information from the mixin
|
||||
* itself. We can overcome this problem by ensuring the mixin inherits from the
|
||||
* same superclass (or at least a superclass which contains the obfuscated
|
||||
* methods or fields used in the mixin), thus allowing our example <tt>initGui
|
||||
* </tt> method to be resolved in the superclass hierarchy. This behaviour is
|
||||
* not available to normal mixins as the AP always resolves the hierarchy via
|
||||
* the target class metadata when it is available.</p>
|
||||
*
|
||||
* <p>{@link Overwrite} methods which are <b>not</b> inherited from a superclass
|
||||
* (if the target is obfuscated) <b>must</b> be decorated manually with aliases.
|
||||
* </p>
|
||||
* <p>If the target class contains obfuscated methods which the mixin needs to
|
||||
* {@link Overwrite} or {@link Shadow} which are <b>not</b> inherited from a
|
||||
* superclass (eg. the target is obfuscated), the {@link Overwrite} or
|
||||
* {@link Shadow} <b>must</b> be decorated manually with <tt>aliases</tt> since
|
||||
* there is no mechanism for the AP to resolve the mappings automatically.</p>
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* See {@link org.spongepowered.asm.mixin.connect.IMixinConnector}
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.connect;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interfaces for internal Mixin objects which provide extensibility for mixin
|
||||
* consumers.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.extensibility;
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generators, a special type of injector which replace the annotated method
|
||||
* with synthetic content, see
|
||||
* {@link org.spongepowered.asm.mixin.gen.Accessor @Accessor} and
|
||||
* {@link org.spongepowered.asm.mixin.gen.Invoker @Invoker}.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.gen;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Exceptions for generators.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.gen.throwables;
|
||||
@@ -69,22 +69,23 @@ import com.google.common.collect.ImmutableList.Builder;
|
||||
/**
|
||||
* <p>Base class for injection point discovery classes. Each subclass describes
|
||||
* a strategy for locating code injection points within an instruction list,
|
||||
* with the {@link #find} method populating a collection with insn nodes from
|
||||
* the supplied list which satisfy its strategy.</p>
|
||||
* with the {@link #find find} method populating a collection with insn nodes
|
||||
* from the supplied list which satisfy its strategy.</p>
|
||||
*
|
||||
* <p>This base class also contains composite strategy factory methods such as
|
||||
* {@link #and} and {@link #or} which allow strategies to be combined using
|
||||
* intersection (and) or union (or) relationships to allow multiple strategies
|
||||
* to be easily combined.</p>
|
||||
* {@link #and and} and {@link #or or} which allow strategies to be combined
|
||||
* using intersection (and) or union (or) relationships to allow multiple
|
||||
* strategies to be easily combined.</p>
|
||||
*
|
||||
* <p>You are free to create your own injection point subclasses, but take note
|
||||
* that it <b>is allowed</b> for a single InjectionPoint instance to be used for
|
||||
* multiple injections and thus implementing classes MUST NOT cache the insn
|
||||
* list, event, or nodes instance passed to the {@link #find} method, as each
|
||||
* call to {@link #find} must be considered a separate functional contract and
|
||||
* the InjectionPoint's lifespan is not linked to the discovery lifespan,
|
||||
* therefore it is important that the InjectionPoint implementation is fully
|
||||
* <b>stateless</b>.</p>
|
||||
* list, event, or nodes instance passed to the {@link #find find} method, as
|
||||
* each call to {@link #find find} must be considered a separate functional
|
||||
* contract and the InjectionPoint's lifespan is not linked to the discovery
|
||||
* lifespan, therefore it is important that the InjectionPoint implementation is
|
||||
* fully <b>stateless</b> and that calls to {@link #find find} are idempotent.
|
||||
* </p>
|
||||
*/
|
||||
public abstract class InjectionPoint {
|
||||
|
||||
|
||||
@@ -38,24 +38,35 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
/**
|
||||
* Specifies that this mixin method should inject an argument modifier to itself
|
||||
* in the target method(s) identified by {@link #method}. This type of injection
|
||||
* provides a lightweight mechanism for changing a single argument of a target
|
||||
* method invocation. To affect multiple arguments at once, use {@link
|
||||
* ModifyArgs} instead.
|
||||
* provides a lightweight mechanism for changing a single argument of a selected
|
||||
* method invocation within the target method(s). To affect multiple arguments
|
||||
* of an invocation all at once, use {@link ModifyArgs} instead.
|
||||
*
|
||||
* <p>Consider the following method call:</p>
|
||||
* <p>Use this injector when a method contains an method invocation and you wish
|
||||
* to change a single value being <em>passed to</em> that method. If you need to
|
||||
* alter an argument <em>received by</em> a target method, use {@link
|
||||
* ModifyVariable} instead.</p>
|
||||
*
|
||||
* <blockquote><pre>// x, y and z are of type float
|
||||
*someObject.setLocation(x, y, z, true);</pre></blockquote>
|
||||
* <p>Consider the following method:</p>
|
||||
*
|
||||
* <p>Let us assume that we wish to modify the <tt>y</tt> value in the method
|
||||
* call. We know that the arguments are <tt>float</tt>s and that the <tt>y</tt>
|
||||
* value is the <em>second</em> (index = 1) <tt>float</tt> argument. Thus our
|
||||
* injector requires the following signature:
|
||||
* <blockquote><pre><code>private void targetMethod() {
|
||||
* Entity someEntity = this.obtainEntity();
|
||||
* float x = 1.0F, y = 3.0F, z = 0.1F;
|
||||
* someEntity.<ins>setLocation</ins>(x, <ins>y</ins>, z, true);
|
||||
*}</code></pre>
|
||||
*</blockquote>
|
||||
*
|
||||
* <p>Let us assume that we wish to modify the <ins><tt>y</tt></ins> value when
|
||||
* calling the <ins><tt>setLocation</tt></ins> method. We know that the
|
||||
* arguments are <tt>float</tt>s and that the <tt>y</tt> value is the <em>second
|
||||
* </em> (index = 1) <tt>float</tt> argument. Thus our injector requires the
|
||||
* following signature:
|
||||
*
|
||||
* <blockquote><pre>@ModifyArg(method = "...", at = ..., index = 1)
|
||||
*private float adjustYCoord(float y) {
|
||||
* return y + 64.0F;
|
||||
*}</pre></blockquote>
|
||||
* <blockquote><code>@ModifyArg(method = "targetMethod", at = @At(value
|
||||
* = "INVOKE", target = "<ins>setLocation(FFFZ)V</ins>"), index = 1)<br />
|
||||
* private float adjustYCoord(float y) {<br />
|
||||
* return y + 64.0F;<br />
|
||||
* }</code></blockquote>
|
||||
*
|
||||
* <p>The callback consumes the original value of <tt>y</tt> and returns the
|
||||
* adjusted value.</p>
|
||||
@@ -64,10 +75,11 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* arguments if required, to provide additional context for the callback. In
|
||||
* this case the arguments of the callback should match the target method:</p>
|
||||
*
|
||||
* <blockquote><pre>@ModifyArg(method = "...", at = ..., index = 1)
|
||||
*private float adjustYCoord(float x, float y, float z, boolean interpolate) {
|
||||
* return (x == 0 && y == 0) ? 0 : y;
|
||||
*}</pre></blockquote>
|
||||
* <blockquote><code>@ModifyArg(method = "targetMethod", at = @At(value
|
||||
* = "INVOKE", target = "<ins>setLocation(FFFZ)V</ins>"), index = 1)<br />
|
||||
* private float adjustYCoord(float x, float y, float z, boolean interpolate) {
|
||||
* <br /> return (x == 0 && y == 0) ? 0 : y;<br />
|
||||
* }</code></blockquote>
|
||||
*/
|
||||
@Target({ ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -37,20 +37,27 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
|
||||
/**
|
||||
* Specifies that this mixin method should inject a variable modifier callback
|
||||
* to itself in the target method(s) identified by {@link #method}.
|
||||
* to itself in the target method(s) identified by {@link #method}. The variable
|
||||
* modifier can modify a single local variable in the target method frame.
|
||||
*
|
||||
* <p>If the variable being modified is a method argument, specifying the
|
||||
* <tt>{@link #argsOnly argsOnly=true}</tt> reduces the overhead of calculating
|
||||
* the local variable table for the method.</p>
|
||||
*
|
||||
* <p><tt>ModifyVariable</tt> callbacks should always take one argument of the
|
||||
* type to capture and return the same type. For example a <tt>ModifyVariable
|
||||
* </tt> for a local of type {@link String} should have the signature:</p>
|
||||
* </tt> for a local of type <ins>{@link String}</ins> should have the
|
||||
* signature:</p>
|
||||
*
|
||||
* <code>private String methodName(String variable) { ...</code>
|
||||
* <blockquote><code>private <ins>String</ins> myHandlerMethod(<ins>String</ins>
|
||||
* variable) {<br /> ...</code></blockquote>
|
||||
*
|
||||
* <p>The callback receives the current value of the local variable, and should
|
||||
* return the new value.</p>
|
||||
*
|
||||
* <p>The injector has two operating modes, <em>explicit</em> and <em>implicit
|
||||
* </em>, and can operate either on the entire LVT or on the method arguments
|
||||
* only</p>.
|
||||
* </em>, and can operate either on the entire LVT or on the {@link #argsOnly
|
||||
* ethod arguments only}.</p>
|
||||
*
|
||||
* <p>In <em>explicit</em> mode, the variable to capture can be specified by
|
||||
* specifying values for the discriminator arguments {@link #ordinal},
|
||||
|
||||
@@ -55,7 +55,7 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* int def = 1;
|
||||
* Foo someObject = new Foo();
|
||||
*
|
||||
* // Hooking this method
|
||||
* <del>// Hooking this method</del>
|
||||
* boolean xyz = someObject.bar(abc, def);
|
||||
*}</pre>
|
||||
* </blockquote>
|
||||
@@ -63,7 +63,7 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* <p>The signature of the redirected method should be:</p>
|
||||
*
|
||||
* <blockquote>
|
||||
* <pre>public boolean barProxy(Foo someObject, int abc, int def)</pre>
|
||||
* <code>public boolean barProxy(Foo someObject, int abc, int def)</code>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>For obvious reasons this does not apply for static methods, for static
|
||||
@@ -77,8 +77,8 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* arguments) by appending the arguments to the method signature:</p>
|
||||
*
|
||||
* <blockquote>
|
||||
* <pre>public boolean barProxy(Foo someObject, int abc, int def,
|
||||
* int someInt, String someString)</pre>
|
||||
* <code>public boolean barProxy(Foo someObject, int abc, int def,
|
||||
* int someInt, String someString)</code>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>All arguments of a method redirect handler, and the return type, can be
|
||||
@@ -92,7 +92,7 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* handling a field <b>write</b> (<tt>PUTFIELD</tt>, <tt>PUTSTATIC</tt>) or a
|
||||
* field <b>read</b> (<tt>GETFIELD</tt>, <tt>GETSTATIC</tt>).</p>
|
||||
*
|
||||
* <table width="100%">
|
||||
* <table width="100%" class="infoTable">
|
||||
* <tr>
|
||||
* <th width="25%">Operation (OPCODE)</th>
|
||||
* <th>Handler signature</th>
|
||||
@@ -148,7 +148,7 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* <em>indices</em>, for multi-dimensional arrays) and returns <em>the element
|
||||
* type</em> (in this case <tt>String</tt>) as follows:</p>
|
||||
*
|
||||
* <table width="100%">
|
||||
* <table width="100%" class="infoTable">
|
||||
* <tr>
|
||||
* <th width="25%">Operation</th>
|
||||
* <th>Handler signature</th>
|
||||
@@ -177,16 +177,16 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* <tt>array=length</tt> and configure your handler signature to return <tt>int
|
||||
* </tt> and consume the array as an argument:</p>
|
||||
*
|
||||
* <blockquote><code>private int getLength(<b>ElementType</b>[] array)
|
||||
* <blockquote><code>private int getLength(<ins>ElementType</ins>[] array)
|
||||
* </code></blockquote>
|
||||
*
|
||||
* -
|
||||
* <p>For multi-dimensional arrays, provide one <tt>int</tt> argument for each
|
||||
* additional dimension of the array:</p>
|
||||
*
|
||||
* <blockquote><code>// Multidimensional array<br />
|
||||
* private <b>ElementType</b>[][] array;<br /><br />
|
||||
* // Handler signature:<br />
|
||||
* private <b>int</b> getLength(<b>ElementType</b>[][] array, int baseDim)
|
||||
* <blockquote><code><del>// Multidimensional array</del><br />
|
||||
* private <ins>ElementType</ins>[][] array;<br /><br />
|
||||
* <del>// Handler signature:</del><br /> private <ins>int</ins>
|
||||
* getLength(<ins>ElementType</ins>[][] array, int baseDim)
|
||||
* </code></blockquote>
|
||||
*
|
||||
* <h3>New Object Redirect Mode (Factory Mode)</h3>
|
||||
@@ -211,7 +211,7 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
*class Foo {
|
||||
* private final int x, y;
|
||||
*
|
||||
* // ctor we wish to hook
|
||||
* <del>// ctor we wish to hook</del>
|
||||
* Foo(int x, int y) {
|
||||
* this.x = x;
|
||||
* this.y = y;
|
||||
@@ -231,7 +231,7 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* example to redirect the following object creation call:</p>
|
||||
*
|
||||
* <blockquote><pre>public void exampleFunc(String someString, int dx, int dy) {
|
||||
* // Hooking this constructor
|
||||
* <del>// Hooking this constructor</del>
|
||||
* Foo someFoo = new Foo(dx * 10, dy * 10);
|
||||
*}</pre>
|
||||
* </blockquote>
|
||||
@@ -239,15 +239,15 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
* <p>The signature of the handler method should be:</p>
|
||||
*
|
||||
* <blockquote>
|
||||
* <pre>public Foo constructFoo(int x, int y)</pre>
|
||||
* <code>public Foo constructFoo(int x, int y)</code>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>Note that like other redirectors, it is possible to capture the target
|
||||
* method's arguments by appending them to the handler method's signature:</p>
|
||||
*
|
||||
* <blockquote>
|
||||
* <tt>public Foo constructFoo(int x, int y, String someString, int dx,
|
||||
* int dy)</tt>
|
||||
* <code>public Foo constructFoo(int x, int y, String someString, int dx,
|
||||
* int dy)</code>
|
||||
* </blockquote>
|
||||
*
|
||||
* <h3><tt>instanceof</tt> Redirect Mode</h3>
|
||||
@@ -277,8 +277,8 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
*
|
||||
* <p>Note that this results in the injected code being less efficient, because
|
||||
* the <tt>instanceof</tt> opcode is replaced with discrete code similar to <tt>
|
||||
* reference != null && yourClass.isAssignableFrom(reference.getClass())</tt> in
|
||||
* the target method body.</p>
|
||||
* reference != null && yourClass.isAssignableFrom(reference.getClass())
|
||||
* </tt> in the target method body.</p>
|
||||
*
|
||||
* <p>The arguments to an <tt>instanceof</tt> redirect handler <b>must always be
|
||||
* <tt>Object, Class</tt> even if the variable type is known</b>. This is
|
||||
@@ -298,7 +298,7 @@ import org.spongepowered.asm.util.ConstraintParser.Constraint;
|
||||
*
|
||||
* <blockquote><pre>class Foo : Bar {
|
||||
* Foo(int arg) {
|
||||
* super(<span style="background: #FF0">Foo.isEven(arg)</span>);
|
||||
* super(<ins>Foo.isEven(arg)</ins>);
|
||||
* }
|
||||
*
|
||||
* static int isEven(int arg) {
|
||||
|
||||
@@ -85,7 +85,7 @@ import org.spongepowered.asm.mixin.injection.InjectionPoint.Selector;
|
||||
* thing.<b>processStuff</b>();
|
||||
* }
|
||||
*
|
||||
* // A new call to processStuff, which now has the ordinal 1
|
||||
* <del>// A new call to processStuff, which now has the ordinal 1</del>
|
||||
* bar.getActiveThing().<b>processStuff</b>();
|
||||
*
|
||||
* Thing specialThing = bar.getSpecialThing();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of callback injector functionality provided by
|
||||
* {@link org.spongepowered.asm.mixin.injection.Inject @#64;Inject}.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.callback;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common base classes for injector implementations.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.code;
|
||||
@@ -65,7 +65,7 @@ import com.google.common.primitives.Ints;
|
||||
* int def = 1;
|
||||
* Foo someObject = new Foo();
|
||||
*
|
||||
* // Hooking this method
|
||||
* <del>// Hooking this method</del>
|
||||
* boolean xyz = someObject.bar(abc, def);</pre>
|
||||
* </blockquote>
|
||||
*
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support classes for
|
||||
* {@link org.spongepowered.asm.mixin.injection.ModifyArgs @ModifyArgs}
|
||||
* which handle argument bundles
|
||||
* ({@link org.spongepowered.asm.mixin.injection.invoke.arg.Args}).
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.invoke.arg;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of injectors which primarily mutate method invocations.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.invoke;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Utility classes for invoke injectors.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.invoke.util;
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of variable modifier injector specified by
|
||||
* {@link org.spongepowered.asm.mixin.injection.ModifyVariable
|
||||
* @ModifyVariable}
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.modify;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Injectors are class postprocessors which search for annotated methods merged
|
||||
* by mixins and perform weaving operations as requested.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection;
|
||||
@@ -71,41 +71,41 @@ import com.google.common.primitives.Longs;
|
||||
* <dt>ordinal</dt>
|
||||
* <dd>The ordinal position of the constant opcode to match. The default value
|
||||
* is <b>-1</b> which supresses ordinal matching</dd>
|
||||
* <dt><em>named argument</em> nullValue</dt>
|
||||
* <dt><i>named argument:</i> nullValue</dt>
|
||||
* <dd>To match <tt>null</tt> literals in the method body, set this to
|
||||
* <tt>true</tt></dd>
|
||||
* <dt><em>named argument</em> intValue</dt>
|
||||
* <dt><i>named argument:</i> intValue</dt>
|
||||
* <dd>To match <tt>int</tt> literals in the method body. See also the
|
||||
* <em>expandZeroConditions</em> argument below for concerns when matching
|
||||
* conditional zeroes.</dd>
|
||||
* <dt><em>named argument</em> floatValue</dt>
|
||||
* <dt><i>named argument:</i> floatValue</dt>
|
||||
* <dd>To match <tt>float</tt> literals in the method body.</dd>
|
||||
* <dt><em>named argument</em> longValue</dt>
|
||||
* <dt><i>named argument:</i> longValue</dt>
|
||||
* <dd>To match <tt>long</tt> literals in the method body.</dd>
|
||||
* <dt><em>named argument</em> doubleValue</dt>
|
||||
* <dt><i>named argument:</i> doubleValue</dt>
|
||||
* <dd>To match <tt>double</tt> literals in the method body.</dd>
|
||||
* <dt><em>named argument</em> stringValue</dt>
|
||||
* <dt><i>named argument:</i> stringValue</dt>
|
||||
* <dd>To match {@link String} literals in the method body.</dd>
|
||||
* <dt><em>named argument</em> classValue</dt>
|
||||
* <dt><i>named argument:</i> classValue</dt>
|
||||
* <dd>To match {@link Class} literals in the method body.</dd>
|
||||
* <dt><em>named argument</em> log</dt>
|
||||
* <dt><i>named argument:</i> log</dt>
|
||||
* <dd>Enable debug logging when searching for matching opcodes.</dd>
|
||||
* <dt><em>named argument</em> expandZeroConditions</dt>
|
||||
* <dt><i>named argument:</i> expandZeroConditions</dt>
|
||||
* <dd>See the {@link Constant#expandZeroConditions} option, this argument
|
||||
* should be a list of {@link Condition} names</dd>
|
||||
* </dl>
|
||||
*
|
||||
* <p>Examples:</p>
|
||||
* <blockquote><pre>
|
||||
* // Find all integer constans with value 4
|
||||
* <del>// Find all integer constans with value 4</del>
|
||||
* @At(value = "CONSTANT", args = "intValue=4")</pre>
|
||||
* </blockquote>
|
||||
* <blockquote><pre>
|
||||
* // Find the String literal "foo"
|
||||
* <del>// Find the String literal "foo"</del>
|
||||
* @At(value = "CONSTANT", args = "stringValue=foo"</pre>
|
||||
* </blockquote>
|
||||
* <blockquote><pre>
|
||||
* // Find all integer constants with value 0 and expand conditionals
|
||||
* <del>// Find integer constants with value 0 and expand conditionals</del>
|
||||
* @At(
|
||||
* value = "CONSTANT",
|
||||
* args = {
|
||||
|
||||
@@ -49,21 +49,33 @@ import org.spongepowered.asm.util.Bytecode;
|
||||
* <dl>
|
||||
* <dt>target</dt>
|
||||
* <dd>A {@link ITargetSelector Target Selector} which identifies the target
|
||||
* field.</dd>
|
||||
* field.</dd>
|
||||
* <dt>opcode</dt>
|
||||
* <dd>The {@link Opcodes opcode} of the field access, must be one of
|
||||
* GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD.</dd>
|
||||
* GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD.</dd>
|
||||
* <dt>ordinal</dt>
|
||||
* <dd>The ordinal position of the field access to match. For example if the
|
||||
* field is referenced 3 times and you want to match the 3rd then you can
|
||||
* specify an <em>ordinal</em> of <b>2</b> (ordinals are zero-indexed). The
|
||||
* default value is <b>-1</b> which supresses ordinal matching</dd>
|
||||
* field is referenced 3 times and you want to match the 3rd then you can
|
||||
* specify an <em>ordinal</em> of <b>2</b> (ordinals are zero-indexed). The
|
||||
* default value is <b>-1</b> which supresses ordinal matching</dd>
|
||||
* <dt><i>named argument:</i> array</dt>
|
||||
* <dd>For matching accesses to an array field element following a GETFIELD or
|
||||
* GETSTATIC. Specify <tt>get</tt>, <tt>set</tt> or <tt>length</tt> to match
|
||||
* the desired operation.</dd>
|
||||
* <dt><i>named argument:</i> fuzz</dt>
|
||||
* <dd>When matching array operations using <tt>array</tt> the injection point
|
||||
* will by default search up to 8 instructions after the matched field insn.
|
||||
* However in some cases the array operation may be further from the matched
|
||||
* GETFIELD or GETSTATIC and the amount to search (the "fuzz factor" can be
|
||||
* specified using this argument. Likewise to optimise the search against
|
||||
* false positives, this value can be specified as a lower value if desired.
|
||||
* Has no effect if <tt>array</tt> is not specified.</dd>
|
||||
* </dl>
|
||||
*
|
||||
* <p>Example:</p>
|
||||
* <blockquote><pre>
|
||||
* <blockquote><code>
|
||||
* @At(value = "FIELD", target="field_59_z:I", opcode = Opcodes.GETFIELD)
|
||||
* </pre>
|
||||
* </code>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>Matching array access:</p>
|
||||
@@ -72,9 +84,10 @@ import org.spongepowered.asm.util.Bytecode;
|
||||
* operation. To enable this behaviour specify the <tt>array</tt> named-argument
|
||||
* with the desired operation:</p>
|
||||
*
|
||||
* <blockquote><pre>
|
||||
* @At(value = "FIELD", target="myIntArray:[I", args = "array=get")
|
||||
* </pre>
|
||||
* <blockquote><code>
|
||||
* @At(value = "FIELD", target="myIntArray:[I", opcode
|
||||
* = Opcodes.GETFIELD, args = "array=get")
|
||||
* </code>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>See {@link Redirect} for information on array element redirection.</p>
|
||||
|
||||
@@ -52,7 +52,7 @@ import com.google.common.base.Strings;
|
||||
* {@link org.spongepowered.asm.mixin.injection.At At}:</p>
|
||||
*
|
||||
* <dl>
|
||||
* <dt><em>named argument</em> class (or specify using <tt>target</tt></dt>
|
||||
* <dt><i>named argument:</i> class (or specify using <tt>target</tt></dt>
|
||||
* <dd>The value of the NEW node to look for, the fully-qualified class name
|
||||
* </dd>
|
||||
* <dt>ordinal</dt>
|
||||
@@ -70,16 +70,16 @@ import com.google.common.base.Strings;
|
||||
*
|
||||
* <p>Examples:</p>
|
||||
* <blockquote><pre>
|
||||
* // Find all NEW opcodes for <tt>String</tt>
|
||||
* <del>// Find all NEW opcodes for <tt>String</tt></del>
|
||||
* @At(value = "NEW", args = "class=java/lang/String")</pre>
|
||||
* </blockquote>
|
||||
* <blockquote><pre>
|
||||
* // Find all NEW opcodes for <tt>String</tt>
|
||||
* <del>// Find all NEW opcodes for <tt>String</tt></del>
|
||||
* @At(value = "NEW", target = "java/lang/String"</pre>
|
||||
* </blockquote>
|
||||
* <blockquote><pre>
|
||||
* // Find all NEW opcodes for <tt>String</tt> which are constructed using the
|
||||
* // ctor which takes an array of <tt>char</tt>
|
||||
* <del>// Find all NEW opcodes for <tt>String</tt> which are constructed
|
||||
* // using the ctor which takes an array of <tt>char</tt></del>
|
||||
* @At(value = "NEW", target = "([C)Ljava/lang/String;"</pre>
|
||||
* </blockquote>
|
||||
*
|
||||
|
||||
@@ -64,7 +64,7 @@ import org.spongepowered.asm.mixin.injection.struct.InjectionPointData;
|
||||
* the method is invoked 3 times and you want to match the 3rd then you can
|
||||
* specify an <em>ordinal</em> of <b>2</b> (ordinals are zero-indexed). The
|
||||
* default value is <b>-1</b> which supresses ordinal matching</dd>
|
||||
* <dt><em>named argument</em> ldc</dt>
|
||||
* <dt><i>named argument:</i> ldc</dt>
|
||||
* <dd>The value of the LDC node to look for prior to the method invocation
|
||||
* </dd>
|
||||
* </dl>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Built-in {@link org.spongepowered.asm.mixin.injection.InjectionPoint
|
||||
* injection point} classes.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.points;
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dynamic target selectors provide custom logic for selecting injector targets.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.selectors.dynamic;
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Target selectors are consumed by injectors and injection points when
|
||||
* identifying target members in a class or inside a method, see {@link
|
||||
* org.spongepowered.asm.mixin.injection.selectors.ITargetSelector}.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.selectors;
|
||||
@@ -48,43 +48,51 @@ import com.google.common.base.Objects;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
/**
|
||||
* <p>Target selector, also used as a general-purpose information bundle about a
|
||||
* member (method or field) parsed from a String token in another annotation,
|
||||
* this is used where target members need to be specified as Strings in order to
|
||||
* parse the String representation to something useful. See
|
||||
* {@link ITargetSelector} for other supported selector types.</p>
|
||||
* <p>Struct which defines an <b>Explcit Target selector</b>, See
|
||||
* {@link ITargetSelector} for other supported selector types. This struct is
|
||||
* also used as a general-purpose information bundle about a member (method or
|
||||
* field) parsed from a String token in another annotation, this is used where
|
||||
* target members need to be specified as Strings in order to parse the String
|
||||
* representation to something useful.</p>
|
||||
*
|
||||
* <p>Some examples:</p>
|
||||
* <blockquote><pre>
|
||||
* // references a method or field called func_1234_a, if there are multiple
|
||||
* // members with the same signature, matches the first occurrence
|
||||
* func_1234_a
|
||||
* <del>// references a method or field called func_1234_a, if there are
|
||||
* // multiple members with the same signature, matches the first occurrence
|
||||
*</del> func_1234_a
|
||||
*
|
||||
* // references a method or field called func_1234_a, if there are multiple
|
||||
* // members with the same signature, matches all occurrences
|
||||
* <del>// references a method or field called func_1234_a, if there are
|
||||
* // multiple members with matching name, matches all occurrences</del>
|
||||
* func_1234_a*
|
||||
*
|
||||
* // references a method called func_1234_a which takes 3 ints and returns
|
||||
* // a bool
|
||||
* <del>// references all methods which take 3 ints and return a bool</del>
|
||||
* *(III)Z
|
||||
*
|
||||
* <del>// references a method called func_1234_a which takes 3 ints and
|
||||
* // returns a bool</del>
|
||||
* func_1234_a(III)Z
|
||||
*
|
||||
* // references a field called field_5678_z which is a String
|
||||
* <del>// references a field called field_5678_z which is a String</del>
|
||||
* field_5678_z:Ljava/lang/String;
|
||||
*
|
||||
* // references a ctor which takes a single String argument
|
||||
* <del>// references a ctor which takes a single String argument</del>
|
||||
* <init>(Ljava/lang/String;)V
|
||||
*
|
||||
* // references a method called func_1234_a in class foo.bar.Baz
|
||||
* <del>// references a method called func_1234_a in class foo.bar.Baz</del>
|
||||
* Lfoo/bar/Baz;func_1234_a
|
||||
*
|
||||
* // references a field called field_5678_z in class com.example.Dave
|
||||
* Lcom/example/Dave;field_5678_z
|
||||
* <del>// references a field called field_5678_z in class com.example.Dave
|
||||
*</del> Lcom/example/Dave;field_5678_z
|
||||
*
|
||||
* // references a method called func_1234_a in class foo.bar.Baz which takes
|
||||
* // three doubles and returns void
|
||||
* <del>// references a field called field_5678_z in class com.example.Dave
|
||||
* // which is of type String</del>
|
||||
* Lcom/example/Dave;field_5678_z:Ljava/lang/String;
|
||||
*
|
||||
* <del>// references a method called func_1234_a in class foo.bar.Baz which
|
||||
* // takes three doubles and returns void</del>
|
||||
* Lfoo/bar/Baz;func_1234_a(DDD)V
|
||||
*
|
||||
* // alternate syntax for the same
|
||||
* <del>// alternate syntax for the same</del>
|
||||
* foo.bar.Baz.func_1234_a(DDD)V</pre>
|
||||
* </blockquote>
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal data bundles used by injectors during application.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.struct;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Throwable classes (errors and exceptions) for injectors.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.injection.throwables;
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Primary interaction points (
|
||||
* {@link org.spongepowered.asm.mixin.Mixin @Mixin} and
|
||||
* {@link org.spongepowered.asm.mixin.MixinEnvironment @MixinEnvironment})
|
||||
* and annotations (eg.
|
||||
* {@link org.spongepowered.asm.mixin.Mixin @Mixin},
|
||||
* {@link org.spongepowered.asm.mixin.Shadow @Shadow}) for mixin consumers.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin;
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Refmaps are data bundles which map string references to obfuscated
|
||||
* counterparts at runtime, see {@link
|
||||
* org.spongepowered.asm.mixin.refmap.ReferenceMapper}.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.refmap;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal data bundles used by mixin during application.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.struct;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Mixin throwables and throwable base classes.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.throwables;
|
||||
@@ -112,9 +112,9 @@ public final class ClassInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* When using {@link ClassInfo#forType}, determines whether an array type
|
||||
* should be returned as declared (eg. as <tt>Object</tt>) or whether the
|
||||
* element type should be returned instead.
|
||||
* When using {@link ClassInfo#forType ClassInfo.forType}, determines
|
||||
* whether an array type should be returned as declared (eg. as <tt>Object
|
||||
* </tt>) or whether the element type should be returned instead.
|
||||
*/
|
||||
public static enum TypeLookup {
|
||||
|
||||
@@ -974,7 +974,7 @@ public final class ClassInfo {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public MethodMapper getMethodMapper() {
|
||||
MethodMapper getMethodMapper() {
|
||||
return this.methodMapper;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.spongepowered.asm.util.Annotations;
|
||||
* Information about an interface being runtime-patched onto a mixin target
|
||||
* class, see {@link org.spongepowered.asm.mixin.Implements Implements}
|
||||
*/
|
||||
public final class InterfaceInfo {
|
||||
final class InterfaceInfo {
|
||||
|
||||
/**
|
||||
* Parent mixin
|
||||
|
||||
@@ -44,7 +44,7 @@ import com.google.common.base.Strings;
|
||||
/**
|
||||
* Maintains method remaps for a target class
|
||||
*/
|
||||
public class MethodMapper {
|
||||
class MethodMapper {
|
||||
|
||||
/**
|
||||
* Logger
|
||||
|
||||
@@ -69,7 +69,7 @@ import org.spongepowered.asm.util.perf.Profiler.Section;
|
||||
/**
|
||||
* Heart of the Mixin pipeline
|
||||
*/
|
||||
public class MixinProcessor {
|
||||
class MixinProcessor {
|
||||
|
||||
/**
|
||||
* Phase during which an error occurred, delegates to functionality in
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal mixin transformation pipeline extensions.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.transformer.ext.extensions;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal mixin transformation pipeline extension interface and registry of
|
||||
* active extensions.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.transformer.ext;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Meta annotations applied by the mixin processor to fingerprint mixin actions.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.transformer.meta;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal mixin transformation pipeline classes.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.transformer;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Mixin transformation pipeline throwables.
|
||||
*/
|
||||
package org.spongepowered.asm.mixin.transformer.throwables;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Structs for method and field mappings.
|
||||
*/
|
||||
package org.spongepowered.asm.obfuscation.mapping.common;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Structs for method and field mappings with specific behaviour for ForgeGradle
|
||||
* 3 and above.
|
||||
*/
|
||||
package org.spongepowered.asm.obfuscation.mapping.fg3;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Structs for method and field mappings with specific behaviour for MCP
|
||||
*/
|
||||
package org.spongepowered.asm.obfuscation.mapping.mcp;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface for structs for method and field mappings.
|
||||
*/
|
||||
package org.spongepowered.asm.obfuscation.mapping;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Obfuscation-related structs for interoperability with the annotation
|
||||
* processor and runtime obfuscation utilities.
|
||||
*/
|
||||
package org.spongepowered.asm.obfuscation;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Mixin runtime and utilities.
|
||||
*/
|
||||
package org.spongepowered.asm;
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Mixin service interface, with base classes for all the moving parts of the
|
||||
* Mixin transformation pipeline and supporting infrastructure. Abstracted here
|
||||
* and implemented by platform-specific modules.
|
||||
*/
|
||||
package org.spongepowered.asm.service;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Specialised ASM utility and base classes used by the mixin processor.
|
||||
*/
|
||||
package org.spongepowered.asm.transformers;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Utilities, abstractions and specialised subclasses used by Mixin for
|
||||
* interacting with ASM.
|
||||
*/
|
||||
package org.spongepowered.asm.util.asm;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logging abstraction to provide a unified logging interface for classes which
|
||||
* operate both at runtime and in the AP.
|
||||
*/
|
||||
package org.spongepowered.asm.util.logging;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Utility classes used by the entire Mixin pipeline, including utilities for
|
||||
* working with bytecode as well as general-purpose tools and parsers.
|
||||
*/
|
||||
package org.spongepowered.asm.util;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Performance profiling for Mixin.
|
||||
*/
|
||||
package org.spongepowered.asm.util.perf;
|
||||
Reference in new issue
Block a user