Package org.aspectj.internal.lang.annotation

Examples of org.aspectj.internal.lang.annotation.ajcITD


    if (this.declaredITDFields == null) {
      Method[] baseMethods = clazz.getDeclaredMethods();
      for(Method m : baseMethods) {
        if (m.isAnnotationPresent(ajcITD.class)) {
          if (!m.getName().contains("ajc$interFieldInit")) continue;
          ajcITD ann = m.getAnnotation(ajcITD.class);
          String interFieldInitMethodName = m.getName();
          String interFieldGetDispatchMethodName =
            interFieldInitMethodName.replace("FieldInit","FieldGetDispatch");
          try {
            Method dispatch = clazz.getDeclaredMethod(interFieldGetDispatchMethodName, m.getParameterTypes());
            InterTypeFieldDeclaration itdf = new InterTypeFieldDeclarationImpl(
                this,ann.targetType(),ann.modifiers(),ann.name(),
                AjTypeSystem.getAjType(dispatch.getReturnType()),
                dispatch.getGenericReturnType());
            itdfs.add(itdf);
          } catch (NoSuchMethodException nsmEx) {
            throw new IllegalStateException("Can't find field get dispatch method for " + m.getName());
View Full Code Here


    List<InterTypeFieldDeclaration> itdfs = new ArrayList<InterTypeFieldDeclaration>();
    if (this.itdFields == null) {
      Method[] baseMethods = clazz.getMethods();
      for(Method m : baseMethods) {
        if (m.isAnnotationPresent(ajcITD.class)) {
          ajcITD ann = m.getAnnotation(ajcITD.class);
          if (!m.getName().contains("ajc$interFieldInit")) continue;
          if (!Modifier.isPublic(ann.modifiers())) continue;
          String interFieldInitMethodName = m.getName();
          String interFieldGetDispatchMethodName =
            interFieldInitMethodName.replace("FieldInit","FieldGetDispatch");
          try {
            Method dispatch = m.getDeclaringClass().getDeclaredMethod(interFieldGetDispatchMethodName, m.getParameterTypes());
            InterTypeFieldDeclaration itdf = new InterTypeFieldDeclarationImpl(
                this,ann.targetType(),ann.modifiers(),ann.name(),
                AjTypeSystem.getAjType(dispatch.getReturnType()),
                dispatch.getGenericReturnType());
            itdfs.add(itdf);
          } catch (NoSuchMethodException nsmEx) {
            throw new IllegalStateException("Can't find field get dispatch method for " + m.getName());
View Full Code Here

TOP

Related Classes of org.aspectj.internal.lang.annotation.ajcITD

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.