static String PREINITIALIZATION = "preinitialization";
static String INITIALIZATION = "initialization";
static String EXCEPTION_HANDLER = "exception-handler";
+ static String SYNCHRONIZATION_LOCK = "lock";
+ static String SYNCHRONIZATION_UNLOCK = "unlock";
static String ADVICE_EXECUTION = "adviceexecution";
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial implementation
+ *******************************************************************************/
+
+package org.aspectj.lang.reflect;
+
+import org.aspectj.lang.Signature;
+
+public interface LockSignature extends Signature {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial implementation
+ *******************************************************************************/
+
+
+package org.aspectj.lang.reflect;
+
+import org.aspectj.lang.Signature;
+
+public interface UnlockSignature extends Signature {
+
+}
return ret;
}
+ public LockSignature makeLockSig(String stringRep) {
+ LockSignatureImpl ret = new LockSignatureImpl(stringRep);
+ ret.setLookupClassLoader(lookupClassLoader);
+ return ret;
+ }
+ public LockSignature makeLockSig() {
+ Class declaringTypeClass = makeClass("Ljava/lang/Object;",lookupClassLoader);
+ LockSignatureImpl ret = new LockSignatureImpl(declaringTypeClass);
+ ret.setLookupClassLoader(lookupClassLoader);
+ return ret;
+ }
+ public LockSignature makeLockSig(Class declaringType) {
+ LockSignatureImpl ret = new LockSignatureImpl(declaringType);
+ ret.setLookupClassLoader(lookupClassLoader);
+ return ret;
+ }
+
+ public UnlockSignature makeUnlockSig(String stringRep) {
+ UnlockSignatureImpl ret = new UnlockSignatureImpl(stringRep);
+ ret.setLookupClassLoader(lookupClassLoader);
+ return ret;
+ }
+ public UnlockSignature makeUnlockSig() {
+ Class declaringTypeClass = makeClass("Ljava/lang/Object;",lookupClassLoader);
+ UnlockSignatureImpl ret = new UnlockSignatureImpl(declaringTypeClass);
+ ret.setLookupClassLoader(lookupClassLoader);
+ return ret;
+ }
+ public UnlockSignature makeUnlockSig(Class declaringType) {
+ UnlockSignatureImpl ret = new UnlockSignatureImpl(declaringType);
+ ret.setLookupClassLoader(lookupClassLoader);
+ return ret;
+ }
+
public SourceLocation makeSourceLoc(int line, int col)
{
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial implementation
+ *******************************************************************************/
+
+
+package org.aspectj.runtime.reflect;
+
+import java.lang.reflect.Modifier;
+
+import org.aspectj.lang.reflect.LockSignature;
+
+class LockSignatureImpl extends SignatureImpl implements LockSignature {
+ private Class parameterType;
+
+ LockSignatureImpl(Class c) {
+ super(Modifier.STATIC, "lock", c);
+ parameterType = c;
+ }
+
+ LockSignatureImpl(String stringRep) {
+ super(stringRep);
+ }
+
+ protected String createToString(StringMaker sm) {
+ if (parameterType == null) parameterType = extractType(3);
+ return "lock("+sm.makeTypeName(parameterType)+")";
+ }
+
+ public Class getParameterType() {
+ if (parameterType == null) parameterType = extractType(3);
+ return parameterType;
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial implementation
+ *******************************************************************************/
+
+
+package org.aspectj.runtime.reflect;
+
+import java.lang.reflect.Modifier;
+
+import org.aspectj.lang.reflect.UnlockSignature;
+
+class UnlockSignatureImpl extends SignatureImpl implements UnlockSignature {
+ private Class parameterType;
+
+ UnlockSignatureImpl(Class c) {
+ super(Modifier.STATIC, "unlock", c);
+ parameterType = c;
+ }
+
+ UnlockSignatureImpl(String stringRep) {
+ super(stringRep);
+ }
+
+ protected String createToString(StringMaker sm) {
+ if (parameterType == null) parameterType = extractType(3);
+ return "unlock("+sm.makeTypeName(parameterType)+")";
+ }
+
+ public Class getParameterType() {
+ if (parameterType == null) parameterType = extractType(3);
+ return parameterType;
+ }
+}