src/share/classes/sun/tools/java/MemberDefinition.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk Sdiff src/share/classes/sun/tools/java

src/share/classes/sun/tools/java/MemberDefinition.java

Print this page




 239         return expIds;
 240     }
 241 
 242     /**
 243      * Get an inner class.
 244      */
 245     public ClassDefinition getInnerClass() {
 246         return innerClass;
 247     }
 248 
 249     /**
 250      * Is this a synthetic field which holds a copy of,
 251      * or reference to, a local variable or enclosing instance?
 252      */
 253     public boolean isUplevelValue() {
 254         if (!isSynthetic() || !isVariable() || isStatic()) {
 255             return false;
 256         }
 257         String name = this.name.toString();
 258         return name.startsWith(prefixVal)
 259             || name.toString().startsWith(prefixLoc)
 260             || name.toString().startsWith(prefixThis);
 261     }
 262 
 263     public boolean isAccessMethod() {
 264         // This no longer works, because access methods
 265         // for constructors do not use the standard naming
 266         // scheme.
 267         //    return isSynthetic() && isMethod()
 268         //        && name.toString().startsWith(prefixAccess);
 269         // Assume that a method is an access method if it has
 270         // an access peer.  NOTE: An access method will not be
 271         // recognized as such until 'setAccessMethodTarget' has
 272         // been called on it.
 273         return isSynthetic() && isMethod() && (accessPeer != null);
 274     }
 275 
 276     /**
 277      * Is this a synthetic method which provides access to a
 278      * visible private member?
 279      */
 280     public MemberDefinition getAccessMethodTarget() {




 239         return expIds;
 240     }
 241 
 242     /**
 243      * Get an inner class.
 244      */
 245     public ClassDefinition getInnerClass() {
 246         return innerClass;
 247     }
 248 
 249     /**
 250      * Is this a synthetic field which holds a copy of,
 251      * or reference to, a local variable or enclosing instance?
 252      */
 253     public boolean isUplevelValue() {
 254         if (!isSynthetic() || !isVariable() || isStatic()) {
 255             return false;
 256         }
 257         String name = this.name.toString();
 258         return name.startsWith(prefixVal)
 259             || name.startsWith(prefixLoc)
 260             || name.startsWith(prefixThis);
 261     }
 262 
 263     public boolean isAccessMethod() {
 264         // This no longer works, because access methods
 265         // for constructors do not use the standard naming
 266         // scheme.
 267         //    return isSynthetic() && isMethod()
 268         //        && name.toString().startsWith(prefixAccess);
 269         // Assume that a method is an access method if it has
 270         // an access peer.  NOTE: An access method will not be
 271         // recognized as such until 'setAccessMethodTarget' has
 272         // been called on it.
 273         return isSynthetic() && isMethod() && (accessPeer != null);
 274     }
 275 
 276     /**
 277      * Is this a synthetic method which provides access to a
 278      * visible private member?
 279      */
 280     public MemberDefinition getAccessMethodTarget() {


src/share/classes/sun/tools/java/MemberDefinition.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File