* Attached to a factory method, this annotation indicates that any types matching the pattern specified in the annotation value * will have new methods mixed in. The methods will be selected based on a combination of the return type of the factory method, * possibly sub-setted by any list of interfaces specified in the interfaces annotation value. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface DeclareMixin { /** * The target types expression */ String value(); /** * Array of interfaces that are to be mixed in. This is optional and if not specified the return type of the annotated method * will be used to determine the interface to mix in. */ Class[] interfaces() default { Object.class }; } aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/Before.java0000644 0001750 0001750 00000002651 10343136510 033173 0 ustar drazzib drazzib /******************************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * initial implementation Alexandre Vasseur *******************************************************************************/ package org.aspectj.lang.annotation; import java.lang.annotation.Target; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Before advice * * @author Alexandre Vasseur */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Before { /** * The pointcut expression where to bind the advice */ String value(); /** * When compiling without debug info, or when interpreting pointcuts at runtime, * the names of any arguments used in the advice declaration are not available. * Under these circumstances only, it is necessary to provide the arg names in * the annotation - these MUST duplicate the names used in the annotated method. * Format is a simple comma-separated list. */ String argNames() default ""; } aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/Aspect.java0000644 0001750 0001750 00000002117 10232146776 033221 0 ustar drazzib drazzib /******************************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * initial implementation Alexandre Vasseur *******************************************************************************/ package org.aspectj.lang.annotation; import java.lang.annotation.Target; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Aspect declaration * * @author Alexandre Vasseur */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface Aspect { /** * Per clause expression, defaults to singleton aspect *
* Valid values are "" (singleton), "perthis(...)", etc */ public String value() default ""; } ././@LongLink 0000000 0000000 0000000 00000000147 00000000000 011567 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/Pointcut.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/Pointcut.ja0000644 0001750 0001750 00000002715 10327401132 033245 0 ustar drazzib drazzib /******************************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * initial implementation Alexandre Vasseur *******************************************************************************/ package org.aspectj.lang.annotation; import java.lang.annotation.Target; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Pointcut declaration * * @author Alexandre Vasseur */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Pointcut { /** * The pointcut expression * We allow "" as default for abstract pointcut */ String value() default ""; /** * When compiling without debug info, or when interpreting pointcuts at runtime, * the names of any arguments used in the pointcut are not available. * Under these circumstances only, it is necessary to provide the arg names in * the annotation - these MUST duplicate the names used in the annotated method. * Format is a simple comma-separated list. */ String argNames() default ""; } ././@LongLink 0000000 0000000 0000000 00000000160 00000000000 011562 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclareAnnotation.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclareAnno0000644 0001750 0001750 00000002115 10266672675 033244 0 ustar drazzib drazzib /******************************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Alexandre Vasseur initial implementation *******************************************************************************/ package org.aspectj.lang.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.annotation.ElementType; /** * @author Alexandre Vasseur */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) public @interface DeclareAnnotation { /** * pointcut (type pattern for type, or method/ctor/field signature pattern) */ public String value(); } ././@LongLink 0000000 0000000 0000000 00000000154 00000000000 011565 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterThrowing.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterThrowi0000644 0001750 0001750 00000003333 10343136510 033305 0 ustar drazzib drazzib /******************************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * initial implementation Alexandre Vasseur *******************************************************************************/ package org.aspectj.lang.annotation; import java.lang.annotation.Target; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * After throwing advice * * @author Alexandre Vasseur */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface AfterThrowing { /** * The pointcut expression where to bind the advice */ String value() default ""; /** * The pointcut expression where to bind the advice, overrides "value" when specified */ String pointcut() default ""; /** * The name of the argument in the advice signature to bind the thrown exception to */ String throwing() default ""; /** * When compiling without debug info, or when interpreting pointcuts at runtime, * the names of any arguments used in the advice declaration are not available. * Under these circumstances only, it is necessary to provide the arg names in * the annotation - these MUST duplicate the names used in the annotated method. * Format is a simple comma-separated list. */ String argNames() default ""; } ././@LongLink 0000000 0000000 0000000 00000000155 00000000000 011566 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclareWarning.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclareWarn0000644 0001750 0001750 00000002073 10243113410 033227 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @author colyer * Annotation for declare warning... * * usage: @DeclareWarning("somePcut()") * private static final String "a message"; */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface DeclareWarning { /** * The pointcut expression where to bind the error (don't use if, formal bindings, cflow etc) */ String value(); } aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/ 0000755 0001750 0001750 00000000000 11663244525 030410 5 ustar drazzib drazzib ././@LongLink 0000000 0000000 0000000 00000000154 00000000000 011565 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/SignaturePattern.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/SignaturePatte0000644 0001750 0001750 00000001433 10317251273 033264 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * AspectJ runtime representation of a signature pattern as used in various * aspect members (for example, declare @method, declare @field). */ public interface SignaturePattern { /** return a String representation of this pattern */ String asString(); } ././@LongLink 0000000 0000000 0000000 00000000165 00000000000 011567 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/TypePatternBasedPerClause.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/TypePatternBas0000644 0001750 0001750 00000001416 10317251273 033233 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * AspectJ runtime representation of a type pattern based per-clause associated * with an aspect (pertypewithin). * */ public interface TypePatternBasedPerClause { /** * Get the associated type pattern */ TypePattern getTypePattern(); } ././@LongLink 0000000 0000000 0000000 00000000173 00000000000 011566 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/InterTypeConstructorDeclaration.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/InterTypeConst0000644 0001750 0001750 00000001757 10320505026 033260 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; import java.lang.reflect.Type; /** * Runtime representation of an inter-type constructor member declared within an * aspect. */ public interface InterTypeConstructorDeclaration extends InterTypeDeclaration { /** * The constructor parameters */ AjType>[] getParameterTypes(); /** * The generic constructor parameters */ Type[] getGenericParameterTypes(); /** * The declared exceptions thrown by this constructor */ AjType>[] getExceptionTypes(); } ././@LongLink 0000000 0000000 0000000 00000000155 00000000000 011566 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/DeclarePrecedence.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/DeclarePrecede0000644 0001750 0001750 00000001755 10317251273 033163 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * AspectJ runtime representation of a declare precedence statement as * declared in an aspect. */ public interface DeclarePrecedence { /** * The declaring aspect */ AjType getDeclaringType(); /** * Returns an ordered set of type patterns. An aspect matching * a type pattern at a lower index in the array takes precedence * over an aspect that only matches a type pattern at a higher * index in the array. */ TypePattern[] getPrecedenceOrder(); } ././@LongLink 0000000 0000000 0000000 00000000161 00000000000 011563 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/DeclareErrorOrWarning.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/DeclareErrorOr0000644 0001750 0001750 00000002143 10317251273 033176 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * AspectJ runtime representation of a declare error or declare warning member * in an aspect. */ public interface DeclareErrorOrWarning { /** * The type that declared this declare warning or declare error member. */ AjType getDeclaringType(); /** * The pointcut expression associated with the warning or error */ PointcutExpression getPointcutExpression(); /** * The message associated with the declare warning / declare error */ String getMessage(); /** * True if this is a declare error member, false if it is declare warning */ boolean isError(); } ././@LongLink 0000000 0000000 0000000 00000000147 00000000000 011567 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/TypePattern.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/TypePattern.ja0000644 0001750 0001750 00000001355 10317251273 033200 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * AspectJ runtime representation of a type pattern as used in member declarations * such as declare parents. */ public interface TypePattern { /** a string representation of the pattern */ String asString(); } ././@LongLink 0000000 0000000 0000000 00000000161 00000000000 011563 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/NoSuchAdviceException.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/NoSuchAdviceEx0000644 0001750 0001750 00000001724 10317251273 033140 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * Thrown when AjType.getDeclaredAdvice is called with an advice name and no matching * advice declaration can be found. */ public class NoSuchAdviceException extends Exception { private static final long serialVersionUID = 3256444698657634352L; private String name; public NoSuchAdviceException(String name) { this.name = name; } /** * The advice name that could not be found. */ public String getName() { return name; } } ././@LongLink 0000000 0000000 0000000 00000000152 00000000000 011563 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/DeclareParents.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/DeclareParents0000644 0001750 0001750 00000002242 10320254615 033215 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; import java.lang.reflect.Type; /** * A declare parents member defined inside an aspect */ public interface DeclareParents { /** * The declaring aspect */ AjType getDeclaringType(); /** * The target type pattern */ TypePattern getTargetTypesPattern(); /** * True if this is a declare parents...extends member declaration */ boolean isExtends(); /** * True if this is a declare parents...implements member declaration */ boolean isImplements(); /** * The set of types that the types matching getTargetTypesPattern are * declared to implement or extend */ Type[] getParentTypes() throws ClassNotFoundException; } ././@LongLink 0000000 0000000 0000000 00000000146 00000000000 011566 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/AdviceKind.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/AdviceKind.jav0000644 0001750 0001750 00000001235 10317251273 033105 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * The different kinds of advice in AspectJ */ public enum AdviceKind { BEFORE, AFTER, AFTER_RETURNING, AFTER_THROWING, AROUND; } ././@LongLink 0000000 0000000 0000000 00000000160 00000000000 011562 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/InterTypeDeclaration.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/InterTypeDecla0000644 0001750 0001750 00000001650 10320505026 033172 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; /** * Represents an inter-type method, field, or constructor declared in an aspect. */ public interface InterTypeDeclaration { /** * The declaring aspect */ AjType> getDeclaringType(); /** * The target type of this ITD */ AjType> getTargetType() throws ClassNotFoundException; /** * Member modifiers, can be interpreted using java.lang.reflect.Modifier */ int getModifiers(); } ././@LongLink 0000000 0000000 0000000 00000000166 00000000000 011570 L ustar root root aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/InterTypeMethodDeclaration.java aspectj-1.6.12+dfsg/org.aspectj/modules/aspectj5rt/java5-src/org/aspectj/lang/reflect/InterTypeMetho0000644 0001750 0001750 00000002474 10320505026 033243 0 ustar drazzib drazzib /* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; /** * Represents an inter-type method declaration member within an aspect. */ public interface InterTypeMethodDeclaration extends InterTypeDeclaration { /** * The name of this method */ String getName(); /** * The method return type */ AjType> getReturnType(); /** * The generic return type */ Type getGenericReturnType(); /** * The method parameters */ AjType>[] getParameterTypes(); /** * The generic method parameters */ Type[] getGenericParameterTypes(); /** * The type variables declared by this method */ TypeVariableAjType fooType = AjTypeSystem.getAjType(Foo.class);
*/
public class AjTypeSystem {
private static Map" + "" + kind + " | ||
" + "" + "" + generateSignatures(decl)
+ " "; if (!comment.equals("")) { entry += comment + " "; } entry += generateAffects(decl) + " | " + "\n"; } else if (kind.equals(POINTCUT_SUMMARY)) { entry += " | |
" + "" + genAccessibility(decl) + "" + " | \n" + "" + "" + decl.toLabelString()
+ " "; if (!comment.equals("")) { entry += comment + " "; } entry += " | |
" + "" + generateModifierInformation(decl, false) + "" + " | " + "" + "" + ""
+ decl.toLabelString() + " " + generateAffects(decl); } else if (kind.equals(ITD_FIELD_SUMMARY) || kind.equals(ITD_METHOD_SUMMARY)) { entry += " | |
" + "" + generateModifierInformation(decl, false) + "" + " | " + "" + "" + ""
+ decl.toLabelString() + " " + generateDeclaredBy(decl); } else if (kind.equals(ITD_CONSTRUCTOR_SUMMARY)) { entry += " | " + "" + "" + decl.toLabelString()
+ " " + generateDeclaredBy(decl); } // insert the entry fileBuffer.insert(insertIndex, entry); insertIndex += entry.length(); } } // insert the end of the table String tableTail = " |
\n"; fileBuffer.insert(insertIndex, tableTail); insertIndex += tableTail.length(); } private static boolean declsAboveVisibilityExist(List decls) { boolean exist = false; for (Iterator it = decls.iterator(); it.hasNext();) { IProgramElement element = (IProgramElement) it.next(); if (isAboveVisibility(element)) exist = true; } return exist; } private static boolean isAboveVisibility(IProgramElement element) { IProgramElement.Accessibility acc = element.getAccessibility(); if (docVisibilityModifier.equals("private")) { // show all classes and members return true; } else if (docVisibilityModifier.equals("package")) { // show package, protected and public classes and members return acc.equals(IProgramElement.Accessibility.PACKAGE) || acc.equals(IProgramElement.Accessibility.PROTECTED) || acc.equals(IProgramElement.Accessibility.PUBLIC); } else if (docVisibilityModifier.equals("protected")) { // show protected and public classes and members return acc.equals(IProgramElement.Accessibility.PROTECTED) || acc.equals(IProgramElement.Accessibility.PUBLIC); } else if (docVisibilityModifier.equals("public")) { // show public classes and members return acc.equals(IProgramElement.Accessibility.PUBLIC); } return false; } private static String genAccessibility(IProgramElement decl) { if (decl.getAccessibility().equals(IProgramElement.Accessibility.PACKAGE)) { return "(package private)"; } else { return decl.getAccessibility().toString(); } } static void insertDeclarationsDetails(StringBuffer fileBuffer, List decls, String kind, int index) { if (!declsAboveVisibilityExist(decls)) return; int insertIndex = findDetailsIndex(fileBuffer, index); // insert the table heading String detailsHeading = "
\n" + "\n\n" + "
\n" + "" + kind + " | \n" + "
"; entry += "" + generateSignatures(decl) + "\n" + "
" + generateDetailsComment(decl) + "
" + generateAffects(decl); } else if (kind.equals(POINTCUT_DETAIL)) { entry += "
" + generateDetailsComment(decl); } else if (kind.equals(DECLARE_DETAIL)) { entry += "
" + generateModifierInformation(decl, true); if (!decl.getKind().equals(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR)) { entry += " "; } // if we're not a declare statement then we need to generate the signature. // If we did this for declare statements we get two repeated lines if (!decl.getKind().isDeclare()) { String sigs = generateSignatures(decl); entry += sigs + "
"; } entry += generateAffects(decl) + generateDetailsComment(decl); } // insert the entry if (i != decls.size() - 1) { entry += "
"; } fileBuffer.insert(insertIndex, entry); insertIndex += entry.length(); } } } /** * TODO: don't place the summary first. */ static int findSummaryIndex(StringBuffer fileBuffer, int index) { String fbs = fileBuffer.toString(); String MARKER_1 = ""; String MARKER_2 = ""; int index1 = fbs.indexOf(MARKER_1, index); int index2 = fbs.indexOf(MARKER_2, index); if (index1 < index2 && index1 != -1) { return index1; } else if (index2 != -1) { return index2; } else { return index; } } static int findDetailsIndex(StringBuffer fileBuffer, int index) { String fbs = fileBuffer.toString(); String MARKER_1 = ""; String MARKER_2 = ""; String MARKER_3 = ""; int index1 = fbs.indexOf(MARKER_1, index); int index2 = fbs.indexOf(MARKER_2, index); int index3 = fbs.indexOf(MARKER_3, index); if (index1 != -1 && index1 < index2 && index1 < index3) { return index1; } else if (index2 != -1 && index2 < index1 && index2 < index3) { return index2; } else if (index3 != -1) { return index3; } else { return index; } } static void decorateDocWithRel(IProgramElement node, StringBuffer fileContentsBuffer, int index, List targets, HtmlRelationshipKind relKind) { if (targets != null && !targets.isEmpty()) { String adviceDoc = "
" + relKind.toString() + " | "; String relativePackagePath = getRelativePathFromHere(node.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR); List addedNames = new ArrayList(); for (Iterator it = targets.iterator(); it.hasNext();) { Object o = it.next(); IProgramElement currDecl = null; if (o instanceof String) { String currHandle = (String) o; currDecl = node.getModel().getHierarchy().findElementForHandle(currHandle); } else if (o instanceof IProgramElement) { currDecl = (IProgramElement) o; } else { return; } String packagePath = ""; if (currDecl.getPackageName() != null && !currDecl.getPackageName().equals("")) { packagePath = currDecl.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR; } String hrefName = ""; String hrefLink = ""; // Start the hRefLink with the relative path based on where // *this* type (i.e. the advised) is in the package structure. hrefLink = relativePackagePath + packagePath; if (currDecl.getPackageName() != null) { hrefName = currDecl.getPackageName().replace('.', '/'); } // in the case of nested classes, in order for the links to work, // need to have the correct file name which is something of the // form parentClass.nestedAspect.html List names = new ArrayList(); IProgramElement parent = currDecl; while (parent != null && parent.getParent() != null && (!parent.getParent().getKind().equals(IProgramElement.Kind.FILE_JAVA) && !parent.getParent().getKind() .equals(IProgramElement.Kind.FILE_ASPECTJ))) { parent = parent.getParent(); names.add(parent.toLinkLabelString()); } StringBuffer sbuff = new StringBuffer(); for (int i = names.size() - 1; i >= 0; i--) { String element = (String) names.get(i); if (i == 0) { sbuff.append(element); } else { sbuff.append(element + "."); } } // use the currDecl.toLabelString rather than currDecl.getName() // because two distinct advice blocks can have the same // currDecl.getName() and wouldn't both appear in the ajdoc hrefName += Config.DIR_SEP_CHAR + sbuff.toString() + "." + currDecl.toLabelString(); // need to replace " with quot; otherwise the links wont work // for 'matches declare' relationship StringBuffer sb = new StringBuffer(currDecl.toLabelString()); int nextQuote = sb.toString().indexOf("\""); while (nextQuote != -1) { sb.deleteCharAt(nextQuote); sb.insert(nextQuote, "quot;"); nextQuote = sb.toString().indexOf("\""); } hrefLink += sbuff.toString() + ".html" + "#" + sb.toString(); if (!addedNames.contains(hrefName)) { adviceDoc = adviceDoc + "" + hrefName.replace('/', '.') + ""; if (it.hasNext()) adviceDoc += ", "; addedNames.add(hrefName); } } adviceDoc += " |
" + " Declared by: | "; String relativePackagePath = getRelativePathFromHere(decl.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR); if (decl != null && !StructureUtil.isAnonymous(decl.getParent())) { String packagePath = ""; if (decl.getPackageName() != null && !decl.getPackageName().equals("")) { packagePath = decl.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR; } String typeSignature = constructNestedTypeName(decl); String hrefName = packagePath + typeSignature; // The hrefLink needs to just be the corresponding aspect String hrefLink = relativePackagePath + packagePath + typeSignature + ".html"; entry += "" + hrefName.replace('/', '.') + ""; // !!! don't replace } entry += " |
" + HtmlRelationshipKind.ADVISES.toString() + " | "; } else if (kind.equals(IProgramElement.Kind.DECLARE_WARNING) || kind.equals(IProgramElement.Kind.DECLARE_ERROR)) { entry += " | " + HtmlRelationshipKind.MATCHED_BY.toString() + " | "; } else if (kind.isDeclareAnnotation()) { entry += " | " + HtmlRelationshipKind.ANNOTATES.toString() + " | "; } else if (kind.equals(IProgramElement.Kind.DECLARE_SOFT)) { entry += " | " + HtmlRelationshipKind.SOFTENS.toString() + " | "; } else { entry += " | " + HtmlRelationshipKind.DECLARED_ON.toString() + " | "; } String relativePackagePath = getRelativePathFromHere(decl.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR); List addedNames = new ArrayList(); // for ensuring that we don't add duplciates for (Iterator it = targets.iterator(); it.hasNext();) { String currHandle = (String) it.next(); IProgramElement currDecl = decl.getModel().getHierarchy().findElementForHandle(currHandle); if (currDecl.getKind().equals(IProgramElement.Kind.CODE)) { currDecl = currDecl.getParent(); // promote to enclosing } if (currDecl != null && !StructureUtil.isAnonymous(currDecl.getParent())) { String packagePath = ""; if (currDecl.getPackageName() != null && !currDecl.getPackageName().equals("")) { packagePath = currDecl.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR; } String typeSignature = constructNestedTypeName(currDecl); String hrefName = packagePath + typeSignature; // Start the hRefLink with the relative path based on where // *this* type (i.e. the advisor) is in the package structure. String hrefLink = relativePackagePath + packagePath + typeSignature + ".html"; if (!currDecl.getKind().isType()) { hrefName += '.' + currDecl.getName(); hrefLink += "#" + currDecl.toLabelString(); } if (!addedNames.contains(hrefName)) { entry += "" + hrefName.replace('/', '.') + ""; // !!! don't replace if (it.hasNext()) entry += ", "; addedNames.add(hrefName); } } } entry += " |
packagePath
.
*/
private static String getRelativePathFromHere(String packagePath) {
StringBuffer result = new StringBuffer("");
if (packagePath != null && (packagePath.indexOf("/") != -1)) {
StringTokenizer sTok = new StringTokenizer(packagePath, "/", false);
while (sTok.hasMoreTokens()) {
sTok.nextToken(); // don't care about the token value
result.append(".." + Config.DIR_SEP_CHAR);
}// end while
}// end if
return result.toString();
}
/**
* Generate the "public int"-type information about the given IProgramElement. Used when dealing with ITDs. To mirror the
* behaviour of methods and fields in classes, if we're generating the summary information we don't want to include "public" if
* the accessibility of the IProgramElement is public.
*
*/
private static String generateModifierInformation(IProgramElement decl, boolean isDetails) {
String intro = "";
if (decl.getKind().isDeclare()) {
return intro + "";
}
if (isDetails || !decl.getAccessibility().equals(IProgramElement.Accessibility.PUBLIC)) {
intro += "" + decl.getAccessibility().toString() + " ";
}
if (decl.getKind().equals(IProgramElement.Kind.INTER_TYPE_FIELD)) {
return intro + decl.getCorrespondingType() + "";
} else if (decl.getKind().equals(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR) && isDetails) {
return intro + "";
} else {
return intro + decl.getCorrespondingType(true) + "";
}
}
static String generateIntroductionSignatures(IProgramElement decl, boolean isDetails) {
return "This module exports jdtcore.jar to anyone who depends on it. That .jar contains a lightly modified version of the eclipse JDT compiler and all of its dependencies. The .jar is built from shadows/org.eclipse.jdt.core. See shadows/README.html for more information.
aspectj-1.6.12+dfsg/org.aspectj/modules/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip 0000644 0001750 0001750 00015177146 11632160352 031060 0 ustar drazzib drazzib PK @(? META-INF/ţĘ PK }@(?V^ j META-INF/MANIFEST.MFóMĚËLK-.Ń K-*ÎĚĎłR0Ô3ŕĺrĚCq,HLÎHU %-ôxšRKRSt*AęÍôâĚtu-u M 4 rR<óő4yšxš PK '? org/PK '? org/aspectj/PK '? org/aspectj/org/PK '? org/aspectj/org/eclipse/PK '? org/aspectj/org/eclipse/jdt/PK '? % org/aspectj/org/eclipse/jdt/internal/PK '? . org/aspectj/org/eclipse/jdt/internal/compiler/PK '? 4 org/aspectj/org/eclipse/jdt/internal/compiler/batch/PK '?łŮ`X 8 K org/aspectj/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.javaŐYmo7ţ,ý ÚâÝX^ÉýĐŃ9ăÚÇ6ŹwEÔSäIIQS˙÷!šŻZŐŽŻŔádÄÖ.ç3Ďţż÷Ó%oČĘ6ĎćDiLž=üýš|˙uŚ4ľ\IBĺ(;gÚ$Čw*q|hf^ąIB>Íš!V3Mč MSľČ¨Üp9#jćTA5 YQ.čX0˛ŚĐ-QS÷p FncÁSrĹS&áquPĐzÎÓyĄ3L`ÉŤůxö÷=đ˛ÔE-ňÎÍŢöűëő:a^K˘ôŹ/Ř>ËÄŃęxĚíB ąôB6oń~Á:"\r~ÓŰKŻy ś`Ň:ŕű{?ýnFÓ:cO¨ÉXjż # S_&6á˘*ŠH0P\0ŠMçĂnĚSÚ/Ťäm/%]0řbś/oÎżŚ,C÷ęk| fn1켲?ł4UVÍŠžÉîđ9üŰŚ3]Řäż /wrOżPŤä4M1wKÁFĚţrŽ!¨çrĹľ!§ŇŹ_lWF5Tc2JŠL`"{ą(ˇo÷đś,ó çH\3jç?r ˛ŢöŐ29Š,]ŠÔÂ7`Ö|uORŘĆ_>Šô ţ;Üá°XA]DdľEŢ@5eg4ł&Č]pcŕŰ/J ÉÖ9Íńç ü%5aCŇď:ćŰ ą()6$UŇpdWĐ7%S!QKöš¤ŕ&îńLŘ. %K@Ś1@eÓ1&S5/NŁSÓĽ | :e tÔ`4şÝíGÁeLzM%˝ÂÁév:ľTE¤, Ö 3Â]Ăaë:f ů5čĂnń6AmpŐđ mW ÉŮÓąQbiňFČţG{yôOkčbb¤4Ţ8?JĄ'¤žŤŹçIH"˘ăăÂŢ