aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CtField.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2005-01-12 16:09:47 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2005-01-12 16:09:47 +0000
commite793a77000f14fd8272388f7b2878a54e2d628ca (patch)
tree47c705d645288afd4bc39a87a4baf80154222401 /src/main/javassist/CtField.java
parent91895bb38cf5cf4feaf8dcb3ba76555d67d765db (diff)
downloadjavassist-e793a77000f14fd8272388f7b2878a54e2d628ca.tar.gz
javassist-e793a77000f14fd8272388f7b2878a54e2d628ca.zip
implemented removeMethod() etc.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@151 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/CtField.java')
-rw-r--r--src/main/javassist/CtField.java33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/main/javassist/CtField.java b/src/main/javassist/CtField.java
index c537ed58..cfda5a22 100644
--- a/src/main/javassist/CtField.java
+++ b/src/main/javassist/CtField.java
@@ -27,7 +27,6 @@ import javassist.compiler.ast.ASTree;
*/
public class CtField extends CtMember {
protected FieldInfo fieldInfo;
- CtField next;
/**
* Creates a <code>CtField</code> object.
@@ -98,6 +97,14 @@ public class CtField extends CtMember {
next = null;
}
+ /**
+ * Returns a String representation of the object.
+ */
+ public String toString() {
+ return getDeclaringClass().getName() + "." + getName()
+ + ":" + fieldInfo.getDescriptor();
+ }
+
protected void extendToString(StringBuffer buffer) {
buffer.append(' ');
buffer.append(getName());
@@ -149,30 +156,6 @@ public class CtField extends CtMember {
throw new CannotCompileException("not a field");
}
- static CtField append(CtField list, CtField tail) {
- tail.next = null;
- if (list == null)
- return tail;
- else {
- CtField lst = list;
- while (lst.next != null)
- lst = lst.next;
-
- lst.next = tail;
- return list;
- }
- }
-
- static int count(CtField f) {
- int n = 0;
- while (f != null) {
- ++n;
- f = f.next;
- }
-
- return n;
- }
-
/**
* Returns the FieldInfo representing the field in the class file.
*/