re PR libgcj/27729 (Field, Method and Constructor need isSynthetic() implemetation)
gcc/java: PR libgcj/27729: * jcf.h (ACC_INVISIBLE): Changed value. libjava: PR libgcj/27729: * java/lang/reflect/natField.cc (getAddr): Added parens. * java/lang/reflect/natConstructor.cc (getModifiersInternal): Renamed. Don't mask flags. * java/lang/reflect/Constructor.java (CONSTRUCTOR_MODIFIERS): New constant. (getModifiersInternal): Renamed. (getModifiers): Rewrote. (isSynthetic, isVarArgs): New methods. (hashCode): Rewrote. (addTypeParameters, toGenericString): New methods. (getTypeParameters): Rewrote. (getSignature): New method. (getGenericParameterTypes, getGenericExceptionTypes): Likewise. * java/lang/reflect/natMethod.cc (getModifiersInternal): Renamed. Don't mask flags. * java/lang/reflect/natField.cc (getModifiersInternal): Renamed. Don't mask flags. * java/lang/reflect/Modifier.java (BRIDGE, VARARGS, SYNTHETIC, ENUM): New constants. (INVISIBLE): Changed value. * java/lang/reflect/Method.java: Mostly merged with Classpath. (getModifiersInternal): Renamed. (getModifiers): Rewrote. (isBridge, isSynthetic, isVarArgs): New methods. (toGenericString): Likewise. (getTypeParameters): Likewise. (getSignature): Likewise. (getGenericExceptionTypes, getGenericParameterTypes, getGenericReturnType): Likewise. (METHOD_MODIFIERS): New constant. * java/lang/reflect/Field.java: Mostly merged with Classpath. Added javadoc everywhere. (getModifiersInternal): Renamed. (getModifiers, isSynthetic, isEnumConstant): Rewrote. (toGenericString): New method. (getGenericType, getSignature): Likewise. (FIELD_MODIFIERS): New constant. From-SVN: r114046
This commit is contained in:
parent
f32f60c997
commit
5aca4c41f7
10 changed files with 1074 additions and 169 deletions
|
@ -1,5 +1,5 @@
|
|||
/* java.lang.reflect.Modifier
|
||||
Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -157,11 +157,31 @@ public class Modifier
|
|||
*/
|
||||
static final int ALL_FLAGS = 0xfff;
|
||||
|
||||
/**
|
||||
* Flag indicating a bridge method.
|
||||
*/
|
||||
static final int BRIDGE = 0x40;
|
||||
|
||||
/**
|
||||
* Flag indicating a varargs method.
|
||||
*/
|
||||
static final int VARARGS = 0x80;
|
||||
|
||||
/**
|
||||
* Flag indicating a synthetic member.
|
||||
*/
|
||||
static final int SYNTHETIC = 0x1000;
|
||||
|
||||
/**
|
||||
* Flag indicating an enum constant or an enum class.
|
||||
*/
|
||||
static final int ENUM = 0x4000;
|
||||
|
||||
/**
|
||||
* GCJ-LOCAL: This access flag is set on methods we declare
|
||||
* internally but which must not be visible to reflection.
|
||||
*/
|
||||
static final int INVISIBLE = 0x1000;
|
||||
static final int INVISIBLE = 0x8000;
|
||||
|
||||
/**
|
||||
* GCJ-LOCAL: This access flag is set on interpreted classes.
|
||||
|
@ -302,6 +322,18 @@ public class Modifier
|
|||
return toString(mod, new StringBuffer()).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Package helper method that can take a StringBuilder.
|
||||
* @param mod the modifier
|
||||
* @param r the StringBuilder to which the String representation is appended
|
||||
* @return r, with information appended
|
||||
*/
|
||||
static StringBuilder toString(int mod, StringBuilder r)
|
||||
{
|
||||
r.append(toString(mod, new StringBuffer()));
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Package helper method that can take a StringBuffer.
|
||||
* @param mod the modifier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue