瀏覽代碼

updated javadoc comments.


git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@222 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
tags/rel_3_17_1_ga
chiba 18 年之前
父節點
當前提交
7ea6c585a1
共有 2 個文件被更改,包括 19 次插入3 次删除
  1. 4
    0
      src/main/javassist/bytecode/AnnotationsAttribute.java
  2. 15
    3
      src/main/javassist/bytecode/ClassFile.java

+ 4
- 0
src/main/javassist/bytecode/AnnotationsAttribute.java 查看文件

@@ -90,8 +90,12 @@ import javassist.bytecode.annotation.*;
* a.addMemberValue("name", new StringMemberValue("Chiba", cp));
* attr.setAnnotation(a);
* cf.addAttribute(attr);
* cf.setVersionToJava5();
* </pre></ul>
*
* <p>The last statement is necessary if the class file was produced by
* Javassist or JDK 1.4. Otherwise, it is not necessary.
*
* @see AnnotationDefaultAttribute
* @see javassist.bytecode.annotation.Annotation
*/

+ 15
- 3
src/main/javassist/bytecode/ClassFile.java 查看文件

@@ -675,7 +675,7 @@ public final class ClassFile {
}

/**
* Set the Major version.
* Set the major version.
*
* @param major
* the major version
@@ -685,7 +685,7 @@ public final class ClassFile {
}

/**
* Get the Minor version.
* Get the minor version.
*
* @return the minor version
*/
@@ -694,7 +694,7 @@ public final class ClassFile {
}

/**
* Set the Minor version.
* Set the minor version.
*
* @param minor
* the minor version
@@ -702,4 +702,16 @@ public final class ClassFile {
public void setMinorVersion(int minor) {
this.minor = minor;
}

/**
* Sets the major and minor version to Java 5.
*
* If the major version is older than 49, Java 5
* extensions such as annotations are ignored
* by the JVM.
*/
public void setVersionToJava5() {
this.major = 49;
this.minor = 0;
}
}

Loading…
取消
儲存