Considering the piece of the code above:
public class ConditionalCompile {
private static final boolean DEBUG = false;
public static void main(String args[]) {
if(DEBUG){
private static void makeNewClass() throws IOException, CannotCompileException {
ClassPool classPool = ClassPool.getDefault();
CtClass cc = classPool.makeClass("Test");
byte[] bytes = cc.toBytecode();
FileOutputStream fos = new FileOutputStream("/Users/apple/Desktop/Test.class");
__asm__
keyword in C.CheckClassAdapter
class could be used to check if the bytecode generated by ASM is valid.ASMifier
class could be usedd to generate the source code of ASM for generating a specific class.#!/bin/sh | |
eclipseHome="/home/khotyn/softwares/eclipse_java/" | |
pluginName="$1" | |
updateSiteURL="$2" | |
localRepositoryHome="/home/khotyn/softwares/eclipse_plugins/" | |
cd $eclipseHome | |
./eclipse -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source $updateSiteURL -destination "$localRepositoryHome$pluginName" | |
./eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source $updateSiteURL -destination "$localRepositoryHome$pluginName" | |
echo "path=$localRepositoryHome$pluginName" > "$localRepositoryHome$pluginName.link" |
王 | |
江 | |
周 | |
胡 | |
刘 | |
李 | |
吴 | |
毛 | |
温 | |
习 |
from xml.dom.minidom import getDOMImplementation, parse, parseString | |
import zipfile | |
import sys | |
font = """\n<style type='text/css'>\n | |
@page {\n | |
margin-bottom: 5pt;\n | |
margin-top: 5pt\n | |
}\n | |
@font-face {\n |
/** | |
* {@link Integer} will cache the integers between -128 and 127 (inclusive). See | |
* {@link Integer#valueOf(int)} for detail implementation. | |
* | |
* @author khotyn | |
* | |
*/ | |
public class IntegerTest { | |
public static void main(String[] args) { |
/** | |
* Conditional Expression Test. The result is | |
* | |
* <pre> | |
* 114.0 | |
* class java.lang.Double | |
* </pre> | |
* | |
* So why the result is 114.0, the ASCII value of <code>'r'</code>? First, the | |
* <code>new Double(0)</code> is convert to primary type <code>double</code>, |
package com.khotyn.test; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: khotyn | |
* Date: 12-10-18 | |
* Time: 下午9:14 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public class CircularArray { |
package com.khotyn.test; | |
import java.lang.instrument.Instrumentation; | |
public class AgentInstall { | |
public static void premain(String agentArgs, Instrumentation inst) { | |
InstrumentationHolder.setInstrumentation(inst); | |
} | |
} |