[jboss-cvs] javassist SVN: r545 - trunk/src/main/javassist.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat May 15 10:50:12 EDT 2010
Author: chiba
Date: 2010-05-15 10:50:12 -0400 (Sat, 15 May 2010)
New Revision: 545
Modified:
trunk/src/main/javassist/CtArray.java
trunk/src/main/javassist/CtPrimitiveType.java
Log:
fixed JIRA JASSIST-112
Modified: trunk/src/main/javassist/CtArray.java
===================================================================
--- trunk/src/main/javassist/CtArray.java 2010-05-15 13:37:06 UTC (rev 544)
+++ trunk/src/main/javassist/CtArray.java 2010-05-15 14:50:12 UTC (rev 545)
@@ -35,6 +35,26 @@
return true;
}
+ private CtClass[] interfaces = null;
+
+ public int getModifiers() {
+ int mod = Modifier.FINAL;
+ try {
+ mod |= getComponentType().getModifiers()
+ & (Modifier.PROTECTED | Modifier.PUBLIC | Modifier.PRIVATE);
+ }
+ catch (NotFoundException e) {}
+ return mod;
+ }
+
+ public CtClass[] getInterfaces() throws NotFoundException {
+ if (interfaces == null)
+ interfaces = new CtClass[] {
+ pool.get("java.lang.Cloneable"), pool.get("java.io.Serializable") };
+
+ return interfaces;
+ }
+
public boolean subtypeOf(CtClass clazz) throws NotFoundException {
if (super.subtypeOf(clazz))
return true;
Modified: trunk/src/main/javassist/CtPrimitiveType.java
===================================================================
--- trunk/src/main/javassist/CtPrimitiveType.java 2010-05-15 13:37:06 UTC (rev 544)
+++ trunk/src/main/javassist/CtPrimitiveType.java 2010-05-15 14:50:12 UTC (rev 545)
@@ -49,6 +49,16 @@
public boolean isPrimitive() { return true; }
/**
+ * Returns the modifiers for this type.
+ * For decoding, use <code>javassist.Modifier</code>.
+ *
+ * @see Modifier
+ */
+ public int getModifiers() {
+ return Modifier.PUBLIC | Modifier.FINAL;
+ }
+
+ /**
* Returns the descriptor representing this type.
* For example, if the type is int, then the descriptor is I.
*/
More information about the jboss-cvs-commits
mailing list