You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UnlockSignatureImpl.java 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*******************************************************************************
  2. * Copyright (c) 2006 IBM Corporation and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v 2.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  7. *
  8. * Contributors:
  9. * Andy Clement - initial implementation
  10. *******************************************************************************/
  11. package org.aspectj.runtime.reflect;
  12. import java.lang.reflect.Modifier;
  13. import org.aspectj.lang.reflect.UnlockSignature;
  14. class UnlockSignatureImpl extends SignatureImpl implements UnlockSignature {
  15. private Class<?> parameterType;
  16. UnlockSignatureImpl(Class<?> c) {
  17. super(Modifier.STATIC, "unlock", c);
  18. parameterType = c;
  19. }
  20. UnlockSignatureImpl(String stringRep) {
  21. super(stringRep);
  22. }
  23. protected String createToString(StringMaker sm) {
  24. if (parameterType == null) parameterType = extractType(3);
  25. return "unlock("+sm.makeTypeName(parameterType)+")";
  26. }
  27. public Class getParameterType() {
  28. if (parameterType == null) parameterType = extractType(3);
  29. return parameterType;
  30. }
  31. }