Permalink
Browse files

Merge branch 'master' into new-html-docs

  • Loading branch information...
LadyCailin committed Jul 27, 2017
2 parents 2f876e2 + d3bdad1 commit ce19aec5f2a0dedf52f4bd04f6f5255deb604855
Showing with 15,870 additions and 10,222 deletions.
  1. +1 −0 .gitignore
  2. +4 −1 SPECIAL_LICENSE.txt
  3. +38 −2 pom.xml
  4. +11 −3 src/main/java/com/laytonsmith/PureUtilities/ClassLoading/ClassMirror/ClassMirrorVisitor.java
  5. +18 −18 src/main/java/com/laytonsmith/PureUtilities/MSP/CapabilityList.java
  6. +208 −209 src/main/java/com/laytonsmith/PureUtilities/SAXDocument.java
  7. +247 −230 src/main/java/com/laytonsmith/PureUtilities/Web/RequestSettings.java
  8. +10 −0 src/main/java/com/laytonsmith/abstraction/MCBlockStateMeta.java
  9. +15 −5 src/main/java/com/laytonsmith/abstraction/MCEntity.java
  10. +1 −1 src/main/java/com/laytonsmith/abstraction/MCLivingEntity.java
  11. +8 −0 src/main/java/com/laytonsmith/abstraction/MCMapMeta.java
  12. +0 −8 src/main/java/com/laytonsmith/abstraction/MCOfflinePlayer.java
  13. +13 −2 src/main/java/com/laytonsmith/abstraction/MCPlayer.java
  14. +0 −1 src/main/java/com/laytonsmith/abstraction/MCScore.java
  15. +1 −1 src/main/java/com/laytonsmith/abstraction/MCScoreboard.java
  16. +2 −0 src/main/java/com/laytonsmith/abstraction/MCServer.java
  17. +10 −0 src/main/java/com/laytonsmith/abstraction/MCSpawnEggMeta.java
  18. +8 −3 src/main/java/com/laytonsmith/abstraction/MCWorld.java
  19. +19 −0 src/main/java/com/laytonsmith/abstraction/MCWorldBorder.java
  20. +16 −0 src/main/java/com/laytonsmith/abstraction/blocks/MCBanner.java
  21. +2 −0 src/main/java/com/laytonsmith/abstraction/blocks/MCBlockState.java
  22. +7 −0 src/main/java/com/laytonsmith/abstraction/blocks/MCShulkerBox.java
  23. +34 −14 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java
  24. +31 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBlockStateMeta.java
  25. +11 −10 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCItemStack.java
  26. +28 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCMapMeta.java
  27. +0 −5 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCOfflinePlayer.java
  28. +2 −5 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCPotionMeta.java
  29. +0 −5 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCScore.java
  30. +15 −5 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCScoreboard.java
  31. +11 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCServer.java
  32. +31 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCSpawnEggMeta.java
  33. +2 −2 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCTeam.java
  34. +330 −170 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCWorld.java
  35. +93 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCWorldBorder.java
  36. +51 −0 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBanner.java
  37. +5 −0 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBlockState.java
  38. +25 −0 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCShulkerBox.java
  39. +64 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCAbstractHorse.java
  40. +2 −4 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCAreaEffectCloud.java
  41. +2 −34 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCBoat.java
  42. +25 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCChestedHorse.java
  43. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCDonkey.java
  44. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCElderGuardian.java
  45. +22 −7 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCEnderDragon.java
  46. +92 −18 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCEntity.java
  47. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCEvoker.java
  48. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCEvokerFangs.java
  49. +5 −3 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCFishHook.java
  50. +10 −1 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCGuardian.java
  51. +20 −3 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCHorse.java
  52. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCHusk.java
  53. +7 −10 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCLivingEntity.java
  54. +67 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCLlama.java
  55. +16 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCLlamaSpit.java
  56. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCMule.java
  57. +36 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCParrot.java
  58. +93 −63 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCPlayer.java
  59. +34 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCShulkerBullet.java
  60. +10 −1 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCSkeleton.java
  61. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCSkeletonHorse.java
  62. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCStray.java
  63. +2 −4 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCTippedArrow.java
  64. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCVex.java
  65. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCVindicator.java
  66. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCWitch.java
  67. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCWitherSkeleton.java
  68. +10 −1 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCZombie.java
  69. +12 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCZombieHorse.java
  70. +28 −0 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCZombieVillager.java
  71. +18 −2 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitBlockEvents.java
  72. +145 −0 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitEntityEvents.java
  73. +5 −0 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitInventoryEvents.java
  74. +15 −7 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitMiscEvents.java
  75. +3 −7 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitPlayerEvents.java
  76. +44 −36 src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitBlockListener.java
  77. +24 −19 src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitEntityListener.java
  78. +21 −0 src/main/java/com/laytonsmith/abstraction/entities/MCAbstractHorse.java
  79. +2 −8 src/main/java/com/laytonsmith/abstraction/entities/MCBoat.java
  80. +8 −0 src/main/java/com/laytonsmith/abstraction/entities/MCChestedHorse.java
  81. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCDonkey.java
  82. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCElderGuardian.java
  83. +5 −4 src/main/java/com/laytonsmith/abstraction/entities/MCEnderDragon.java
  84. +6 −0 src/main/java/com/laytonsmith/abstraction/entities/MCEvoker.java
  85. +6 −0 src/main/java/com/laytonsmith/abstraction/entities/MCEvokerFangs.java
  86. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCHusk.java
  87. +14 −0 src/main/java/com/laytonsmith/abstraction/entities/MCLlama.java
  88. +6 −0 src/main/java/com/laytonsmith/abstraction/entities/MCLlamaSpit.java
  89. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCMule.java
  90. +12 −0 src/main/java/com/laytonsmith/abstraction/entities/MCParrot.java
  91. +11 −0 src/main/java/com/laytonsmith/abstraction/entities/MCShulkerBullet.java
  92. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCSkeletonHorse.java
  93. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCStray.java
  94. +6 −0 src/main/java/com/laytonsmith/abstraction/entities/MCVex.java
  95. +6 −0 src/main/java/com/laytonsmith/abstraction/entities/MCVindicator.java
  96. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCWitherSkeleton.java
  97. +4 −0 src/main/java/com/laytonsmith/abstraction/entities/MCZombieHorse.java
  98. +10 −0 src/main/java/com/laytonsmith/abstraction/entities/MCZombieVillager.java
  99. +1 −4 src/main/java/com/laytonsmith/abstraction/enums/EnumConvertor.java
  100. +13 −0 src/main/java/com/laytonsmith/abstraction/enums/MCDamageCause.java
  101. +56 −25 src/main/java/com/laytonsmith/abstraction/enums/MCEffect.java
  102. +17 −0 src/main/java/com/laytonsmith/abstraction/enums/MCEnderDragonPhase.java
  103. +17 −0 src/main/java/com/laytonsmith/abstraction/enums/MCEntityType.java
  104. +19 −2 src/main/java/com/laytonsmith/abstraction/enums/MCGameRule.java
  105. +9 −8 src/main/java/com/laytonsmith/abstraction/enums/MCInstrument.java
  106. +2 −1 src/main/java/com/laytonsmith/abstraction/enums/MCInventoryType.java
  107. +7 −0 src/main/java/com/laytonsmith/abstraction/enums/MCMobs.java
  108. +12 −0 src/main/java/com/laytonsmith/abstraction/enums/MCParrotType.java
  109. +3 −1 src/main/java/com/laytonsmith/abstraction/enums/MCParticle.java
  110. +3 −1 src/main/java/com/laytonsmith/abstraction/enums/MCProfession.java
  111. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCProjectileType.java
  112. +16 −0 src/main/java/com/laytonsmith/abstraction/enums/MCRegainReason.java
  113. +561 −5 src/main/java/com/laytonsmith/abstraction/enums/MCSound.java
  114. +17 −0 src/main/java/com/laytonsmith/abstraction/enums/MCSoundCategory.java
  115. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCSpawnReason.java
  116. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCTargetReason.java
  117. +2 −1 src/main/java/com/laytonsmith/abstraction/enums/MCTreeType.java
  118. +4 −0 src/main/java/com/laytonsmith/abstraction/enums/MCVersion.java
  119. +35 −0 src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCEnderDragonPhase.java
  120. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCEntityType.java
  121. +35 −0 src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCParrotType.java
  122. +10 −0 src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCProfession.java
  123. +26 −0 src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCRegainReason.java
  124. +33 −0 src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCSoundCategory.java
  125. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCTargetReason.java
  126. +11 −2 src/main/java/com/laytonsmith/abstraction/events/MCBlockBreakEvent.java
  127. +17 −0 src/main/java/com/laytonsmith/abstraction/events/MCEntityPortalEvent.java
  128. +17 −0 src/main/java/com/laytonsmith/abstraction/events/MCEntityRegainHealthEvent.java
  129. +3 −0 src/main/java/com/laytonsmith/abstraction/events/MCEntityTargetEvent.java
  130. +10 −0 src/main/java/com/laytonsmith/abstraction/events/MCFireworkExplodeEvent.java
  131. +1 −0 src/main/java/com/laytonsmith/abstraction/events/MCInventoryClickEvent.java
  132. +2 −0 src/main/java/com/laytonsmith/abstraction/events/MCPlayerInteractEntityEvent.java
  133. +3 −3 src/main/java/com/laytonsmith/core/AliasCore.java
  134. +9 −5 src/main/java/com/laytonsmith/core/MainSandbox.java
  135. +21 −15 src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
  136. +131 −2 src/main/java/com/laytonsmith/core/ObjectGenerator.java
  137. +3 −2 src/main/java/com/laytonsmith/core/Procedure.java
  138. +1 −43 src/main/java/com/laytonsmith/core/Static.java
  139. +30 −0 src/main/java/com/laytonsmith/core/compiler/keywords/SynchronizedKeyword.java
  140. +4 −0 src/main/java/com/laytonsmith/core/constructs/IVariable.java
  141. +9 −4 src/main/java/com/laytonsmith/core/environments/GlobalEnv.java
  142. +3 −0 src/main/java/com/laytonsmith/core/events/Driver.java
  143. +20 −29 src/main/java/com/laytonsmith/core/events/drivers/BlockEvents.java
  144. +299 −48 src/main/java/com/laytonsmith/core/events/drivers/EntityEvents.java
  145. +2 −1 src/main/java/com/laytonsmith/core/events/drivers/InventoryEvents.java
  146. +17 −41 src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java
  147. +5 −1 src/main/java/com/laytonsmith/core/events/drivers/VehicleEvents.java
  148. +3 −3 src/main/java/com/laytonsmith/core/events/drivers/WeatherEvents.java
  149. +44 −0 src/main/java/com/laytonsmith/core/exceptions/CRE/CREOAuthException.java
  150. +10 −9 src/main/java/com/laytonsmith/core/functions/BasicLogic.java
  151. +4 −4 src/main/java/com/laytonsmith/core/functions/Commands.java
  152. +682 −607 src/main/java/com/laytonsmith/core/functions/Crypto.java
  153. +3,349 −3,326 src/main/java/com/laytonsmith/core/functions/DataHandling.java
  154. +460 −25 src/main/java/com/laytonsmith/core/functions/EntityManagement.java
  155. +84 −46 src/main/java/com/laytonsmith/core/functions/Environment.java
  156. +55 −0 src/main/java/com/laytonsmith/core/functions/InventoryManagement.java
  157. +2 −1 src/main/java/com/laytonsmith/core/functions/Meta.java
  158. +5 −6 src/main/java/com/laytonsmith/core/functions/Minecraft.java
  159. +467 −0 src/main/java/com/laytonsmith/core/functions/OAuth.java
  160. +4,210 −4,045 src/main/java/com/laytonsmith/core/functions/PlayerManagement.java
  161. +79 −42 src/main/java/com/laytonsmith/core/functions/Scoreboards.java
  162. +183 −0 src/main/java/com/laytonsmith/core/functions/Threading.java
  163. +11 −2 src/main/java/com/laytonsmith/core/functions/Web.java
  164. +191 −35 src/main/java/com/laytonsmith/core/functions/World.java
  165. +274 −181 src/main/java/com/laytonsmith/core/functions/XGUI.java
  166. +8 −1 src/main/java/com/laytonsmith/database/MySQLProfile.java
  167. +69 −0 src/main/resources/data_names.txt
  168. +91 −0 src/main/resources/data_values.txt
  169. +4 −5 src/main/resources/docs/Data_Manager
  170. +4 −0 src/main/resources/docs/SQL
  171. +50 −6 src/main/resources/functionDocs/entity_spec
  172. +5 −0 src/main/resources/functionDocs/http_request
  173. +1,447 −561 src/main/resources/public-suffix.txt
  174. +102 −0 src/main/resources/samp_aliases.txt
  175. +14 −14 src/main/resources/samp_auto_include.txt
  176. +0 −105 src/main/resources/samp_config.txt
  177. +12 −10 src/main/resources/samp_main.txt
  178. +1 −1 src/main/resources/syntax-templates/notepad++/default.xml
  179. +1 −1 src/main/resources/syntax-templates/notepad++/obsidian.xml
  180. +1 −1 src/main/resources/syntax-templates/notepad++/solarized_dark.xml
  181. +1 −1 src/main/resources/syntax-templates/notepad++/solarized_light.xml
  182. +2 −2 src/main/resources/syntax-templates/vim/default.vim
  183. +16 −1 src/test/java/com/laytonsmith/testing/ArrayTest.java
View
@@ -8,6 +8,7 @@
.classpath
.project
*.iml
nbproject/
nbactions-provisional-build.xml
nbactions-release-profile.xml
nbactions.xml
View
@@ -10,9 +10,12 @@ under MIT/GPL. In layman's terms, this means that you cannot submit code that ad
Objects, for instance, and keep the copyright on it, you must release that to the public domain,
however, your code will still be available to use under the MIT or GPL license, since
it is immediately released under those licenses, in addition to the copyright being relinquished.
While the project as a whole is only released under MIT or GPL, code that is part of the core
may be individually released under the CC0 license. So if you copy paste individual core files
out, this may be released under your choice of CC0, MIT, or GPL.
If commercialization of the software without crediting
you in the future makes you uncomfortable, please do not submit code to the core.
All other code unrelated to the core language that is included or linked to are
still licensed and released under the MIT license.
still licensed and released under the MIT license.
View
40 pom.xml
@@ -166,24 +166,30 @@
these dependencies are updated, or important dependencies are added.
You can check to see if all dependencies are up to date or not by
running: mvn versions:display-dependency-updates
IMPORTANT: When adding a new non-test dependency, add the license that it uses in a comment
within the dependency
-->
<!-- Bukkit -->
<dependency>
<!-- GPL -->
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.10-R0.1-SNAPSHOT</version>
<version>1.12-R0.1-SNAPSHOT</version>
</dependency>
<!-- Used for storing and retreiving Constructs in a storage transparent medium: JSONs -->
<dependency>
<!-- Apache 2.0 -->
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<!-- BCrypt -->
<dependency>
<!-- MIT -->
<groupId>org.mindrot</groupId>
<artifactId>jBCrypt</artifactId>
<version>1.0</version>
@@ -207,13 +213,15 @@
<!-- Profiling library -->
<dependency>
<!-- Apache 2.0 -->
<groupId>org.perf4j</groupId>
<artifactId>perf4j</artifactId>
<version>0.9.16</version>
<scope>compile</scope>
<type>jar</type>
</dependency>
<dependency>
<!-- Apache 2.0 -->
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
@@ -223,6 +231,7 @@
<!-- Database -->
<!-- SQLite -->
<dependency>
<!-- Apache 2.0 -->
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.7.15-M1</version>
@@ -231,6 +240,7 @@
<!-- Redis -->
<dependency>
<!-- MIT -->
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.5.1</version>
@@ -240,6 +250,7 @@
<!-- MySQL -->
<dependency>
<!-- GPL -->
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.30</version>
@@ -249,20 +260,23 @@
<!-- PostgreSQL -->
<dependency>
<!-- BSD -->
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
<!-- Yaml parsing -->
<dependency>
<!-- Apache 2.0 -->
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.13</version>
</dependency>
<!-- Apache commons IO -->
<dependency>
<!-- Apache 2.0 -->
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
@@ -284,18 +298,26 @@
</dependency>-->
<!-- Embedded SSH Client -->
<dependency>
<!-- BSD -->
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.51</version>
</dependency>
<!-- Charset detection library -->
<dependency>
<!-- Mozilla Public License 1.1 -->
<groupId>net.sourceforge.jchardet</groupId>
<artifactId>jchardet</artifactId>
<version>1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.oltu.oauth2/org.apache.oltu.oauth2.client -->
<dependency>
<!-- Apache License 2.0 -->
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>org.apache.oltu.oauth2.client</artifactId>
<version>1.0.2</version>
</dependency>
<!-- Test libraries -->
<!-- Hamcrest must come before powermock -->
<dependency>
@@ -517,6 +539,7 @@
<include>javax.mail:mail:jar:*</include>
<include>javax.activation:activation:jar:*</include>
<include>postgresql:postgresql:jar:*</include>
<include>org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:jar:*</include>
</includes>
</artifactSet>
<relocations>
@@ -616,6 +639,10 @@
<pattern>org.postgresql</pattern>
<shadedPattern>com.laytonsmith.libs.org.postgresql</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.oltu.oauth2</pattern>
<shadedPattern>com.laytonsmith.libs.org.apache.oltu.oauth2</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
@@ -711,6 +738,12 @@
<include>**</include>
</includes>
</filter>
<filter>
<artifact>org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:jar:*</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
@@ -788,6 +821,9 @@
<include>**/Test*.java</include>
<include>**/*Tests.java</include>
<include>**/*TestCase.java</include>
<!-- Include custom, none specific classes -->
<include>**/RandomTests.java</include>
</includes>
<argLine>${argLine}</argLine>
</configuration>
@@ -5,7 +5,6 @@
import java.util.List;
import java.util.regex.Pattern;
import com.google.common.base.Preconditions;
import com.laytonsmith.PureUtilities.Common.StringUtils;
import org.objectweb.asm.AnnotationVisitor;
@@ -31,15 +30,24 @@ public ClassMirrorVisitor() {
}
public ClassMirror<?> getMirror(URL source) {
Preconditions.checkState(done, "Not done visiting %s", classInfo.name == null ? "none" : classInfo.name);
if(!done) {
throw new IllegalStateException(String.format(
"Not done visiting %s", classInfo.name == null ? "none" : classInfo.name
));
}
return new ClassMirror<Object>(this.classInfo, source);
}
private boolean done;
@Override
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
Preconditions.checkState(!done, "Can't visit %s, because we already visited %s", name, classInfo.name); // Ensure we never visit more than one class
if(done) {
// Ensure we never visit more than one class
throw new IllegalStateException(String.format(
"Can't visit %s, because we already visited %s", name, classInfo.name
));
}
if ((access & ACC_ENUM) == ACC_ENUM) classInfo.isEnum = true;
if ((access & ACC_INTERFACE) == ACC_INTERFACE) classInfo.isInterface = true;
classInfo.modifiers = new ModifierMirror(ModifierMirror.Type.CLASS, access);
@@ -8,13 +8,13 @@
* actions by a remote. The remote is free to update
* this list at any time, and capabilities can have
* various states.
*
*
*/
public class CapabilityList {
private Map<Capability, CapabilityValue> caps = new HashMap<Capability, CapabilityValue>();
private Connection connection;
/**
* Creates a new CapabilityList object.
* @param connection The connection to the server. This will be used
@@ -23,27 +23,27 @@
public CapabilityList(Connection connection){
this.connection = connection;
}
/**
* Clears out this capability list.
*/
public void clear(){
caps.clear();
}
public void setCapability(Capability capability, CapabilityValue value){
if(value.serverReturnable()){
caps.put(capability, value);
} else {
throw new RuntimeException("An error occured during runtime, the server returned an invalid capability: " + value);
}
}
/**
* Returns true if the server supports this capability. If the capability is
* dynamic or unknown, it is looked up from the server.
* @param capability
* @return
* @return
*/
public CapabilityValue hasCapability(Capability capability){
CapabilityValue value = caps.get(capability);
@@ -57,7 +57,7 @@ public CapabilityValue hasCapability(Capability capability){
}
return value;
}
/**
* A capability is intended to be an enum, but since the valid
* values may vary from version to version, an interface is defined instead,
@@ -69,17 +69,17 @@ public CapabilityValue hasCapability(Capability capability){
public interface Capability{
/**
* The namespace of the capability.
* @return
* @return
*/
String namespace();
/**
* The name of the capability.
* @return
* @return
*/
String name();
}
public static enum CapabilityValue{
/**
* This capability is always supported by this server, and
@@ -95,7 +95,7 @@ public CapabilityValue hasCapability(Capability capability){
* This capability is never supported by this server, and
* the client should never request if this is supported
* or not. (It still may succeed, but that is unexpected).
* This is generally reserved for the "default" case, where a
* This is generally reserved for the "default" case, where a
* server doesn't know about a capability at all. If the client
* still attempts the operation, and it succeeds, it will not
* automatically switch the value of this capability, however,
@@ -104,15 +104,15 @@ public CapabilityValue hasCapability(Capability capability){
ALWAYS_UNSUPPORTED(true),
/**
* This capability is supported, but given certain runtime conditions,
* it may change (for instance, lack of permissions).
* it may change (for instance, lack of permissions).
* If the client attempts the operation and it doesn't
* succeed, the value will automatically change to UNSUPPORTED, and the
* server may actively change this.
*/
SUPPORTED(true),
/**
* This capability is unsupported, but given certain runtime conditions,
* it may change (for instance, elevation of permissions).
* it may change (for instance, elevation of permissions).
* If the client forces the operation and it does succeed,
* the value will change automatically to SUPPORTED, and the server may
* actively change this.
@@ -127,18 +127,18 @@ public CapabilityValue hasCapability(Capability capability){
* This is the "default" value, that is, if a client does not know if a server
* supports this capabilty, it works like {@see #DYNAMIC}, but the server's response
* will be cached.
*/
*/
UNKNOWN(false);
private final boolean serverReturnable;
private CapabilityValue(boolean serverReturnable){
this.serverReturnable = serverReturnable;
}
/**
* Returns true if the server can return this value during a request
* for capabilities.
* @return
* @return
*/
public boolean serverReturnable(){
return serverReturnable;
Oops, something went wrong.

0 comments on commit ce19aec

Please sign in to comment.