Example usage for org.eclipse.jdt.internal.core SourceMethodInfo SourceMethodInfo

List of usage examples for org.eclipse.jdt.internal.core SourceMethodInfo SourceMethodInfo

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core SourceMethodInfo SourceMethodInfo.

Prototype

SourceMethodInfo

Source Link

Usage

From source file:org.eclipse.ajdt.core.javaelements.ITDAwareSourceTypeInfo.java

License:Open Source License

/**
 * create the aspectOf method for //from   ww w  . j a v a2  s.  c o  m
 */
private SourceMethod createAspectOf(AspectElement parent) {
    return new SourceMethod((JavaElement) parent, "aspectOf", new String[0]) {
        protected Object createElementInfo() {
            return new SourceMethodInfo() {
                @Override
                public int getModifiers() {
                    return Flags.AccPublic | Flags.AccStatic;
                }

                @Override
                public char[] getReturnTypeName() {
                    return parent.getElementName().toCharArray();
                }
            };
        }

        public boolean exists() {
            return true;
        }
    };

}

From source file:org.eclipse.ajdt.core.javaelements.ITDAwareSourceTypeInfo.java

License:Open Source License

private SourceMethod createHasAspect(AspectElement parent) {
    return new SourceMethod((JavaElement) parent, "hasAspect", new String[0]) {
        protected Object createElementInfo() {
            return new SourceMethodInfo() {
                @Override//  ww  w  .j a v  a 2 s  .  co  m
                public int getModifiers() {
                    return Flags.AccPublic | Flags.AccStatic;
                }

                @Override
                public char[] getReturnTypeName() {
                    return "boolean".toCharArray();
                }
            };
        }

        public boolean exists() {
            return true;
        }
    };

}

From source file:org.eclipse.ajdt.core.javaelements.ITDAwareSourceTypeInfo.java

License:Open Source License

private SourceMethod createGetWithinTypeName(AspectElement parent) {
    return new SourceMethod((JavaElement) parent, "getWithinTypeName", new String[0]) {
        protected Object createElementInfo() {
            return new SourceMethodInfo() {
                @Override/*from w w  w  .  j av  a2  s. c  o  m*/
                public int getModifiers() {
                    return Flags.AccPublic;
                }

                @Override
                public char[] getReturnTypeName() {
                    return "String".toCharArray();
                }
            };
        }

        public boolean exists() {
            return true;
        }
    };

}