本文整理汇总了Java中org.eclipse.xtext.xbase.lib.Procedures.Procedure1方法的典型用法代码示例。如果您正苦于以下问题:Java Procedures.Procedure1方法的具体用法?Java Procedures.Procedure1怎么用?Java Procedures.Procedure1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xtext.xbase.lib.Procedures
的用法示例。
在下文中一共展示了Procedures.Procedure1方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setCompilationStrategy
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
protected void setCompilationStrategy(/* @Nullable */ JvmMember member, /* @Nullable */ Procedures.Procedure1<ITreeAppendable> strategy) {
if(member == null || strategy == null)
return;
CompilationStrategyAdapter adapter = new CompilationStrategyAdapter();
adapter.setCompilationStrategy(strategy);
member.eAdapters().add(adapter);
}
示例2: useProcedureForCharSequence
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* @since 2.3
*/
public String useProcedureForCharSequence(Procedures.Procedure1<CharSequence> proc) {
proc.apply(null);
return "done";
}
示例3: getCompilationStrategy
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
public Procedures.Procedure1<ITreeAppendable> getCompilationStrategy() {
return compilationStrategy;
}
示例4: setCompilationStrategy
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
public void setCompilationStrategy(Procedures.Procedure1<ITreeAppendable> compilationStrategy) {
this.compilationStrategy = compilationStrategy;
}
示例5: Ack
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
public Ack(final Procedures.Procedure1<Ack> initializer) {
initializer.apply(this);
}
示例6: setInitializer
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Attaches the given compile strategy to the given {@link JvmField} such that the compiler knows how to
* initialize the {@link JvmField} when it is translated to Java source code.
*
* @param field the field to add the initializer to. If <code>null</code> this method does nothing.
* @param strategy the compilation strategy. If <code>null</code> this method does nothing.
*/
public void setInitializer(/* @Nullable */ JvmField field, /* @Nullable */ Procedures.Procedure1<ITreeAppendable> strategy) {
if (field == null || strategy == null)
return;
removeExistingBody(field);
setCompilationStrategy(field, strategy);
}
示例7: accept
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Accepts a {@link JvmDeclaredType} with no container, to be added to the contents list of a {@link org.eclipse.emf.ecore.resource.Resource}.
* The second parameter is a lazy initializer that is never executed during <i>preIndexingPhase</i>.
*
* @see IJvmModelInferrer#infer(EObject, IJvmDeclaredTypeAcceptor, boolean)
*
* @param type the type to
* @param lateInitialization the initializer
*/
<T extends JvmDeclaredType> void accept(T type, Procedures.Procedure1<? super T> lateInitialization);
示例8: initializeLater
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* The passed procedure will be executed only if in post-indexing phase, and it is executed after all {@link JvmDeclaredType} are created
* and attached to the {@link org.eclipse.emf.ecore.resource.Resource}.
*
* @deprecated use {@link #accept(JvmDeclaredType, org.eclipse.xtext.xbase.lib.Procedures.Procedure1)} instead
*/
@Deprecated
void initializeLater(Procedures.Procedure1<? super T> lateInitialization);
示例9: setBody
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Attaches the given compile strategy to the given {@link JvmExecutable} such that the compiler knows how to
* implement the {@link JvmExecutable} when it is translated to Java source code.
*
* @param executable the operation or constructor to add the method body to. If <code>null</code> this method does nothing.
* @param strategy the compilation strategy. If <code>null</code> this method does nothing.
*/
public void setBody(/* @Nullable */ JvmExecutable executable, /* @Nullable */ Procedures.Procedure1<ITreeAppendable> strategy) {
removeExistingBody(executable);
setCompilationStrategy(executable, strategy);
}
示例10: newAnnotationReference
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Creates a new annotation reference for the given name.
*
* @param annotationTypeName the name of the annotation type to point to
* @param initializer a callback for further initialization of the create annotation reference, must not be <code>null</code>.
* @return a {@link AnnotationReference} pointing to the type with the give name, or <code>null</code> if no such annotation type could be found.
* @throws IllegalArgumentException if the <code>name</code> is not a valid java identifier or the <code>initializer</code> is <code>null</code>
*/
AnnotationReference newAnnotationReference(String annotationTypeName, Procedures.Procedure1<AnnotationReferenceBuildContext> initializer);
示例11: addValue
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Adds a new value with the given name.
*
* @param name the name of the field to be added, must be not <code>null</code>
* @param initializer a callback for further initialization of the created value, must be not <code>null</code>
* @return the created value declaration
* @exception IllegalArgumentException if the <code>name</code> is not a valid java identifier or the <code>initializer</code> is <code>null</code>
*/
MutableEnumerationValueDeclaration addValue(String name, Procedures.Procedure1<MutableEnumerationValueDeclaration> initializer);
示例12: addField
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Adds a new field with the given name.
*
* @param name the name of the field to be added, must be not <code>null</code>
* @param initializer a callback for further initialization of the created field, must be not <code>null</code>
* @return the created field declaration
* @throws UnsupportedOperationException if the underlying type declaration is not capable of containing methods.
* @exception IllegalArgumentException if the <code>name</code> is not a valid java identifier or the <code>initializer</code> is <code>null</code>
*/
MutableFieldDeclaration addField(String name, Procedures.Procedure1<MutableFieldDeclaration> initializer);
示例13: addMethod
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Adds a new method with the given name to this type declaration.
*
* @param name the name of the method
* @param initializer a call back for further initialization of the method
* @return the created method declaration
* @throws UnsupportedOperationException if the underlying type declaration is not capable of containing methods.
* @exception IllegalArgumentException if the <code>name</code> is not a valid java identifier or the <code>initializer</code> is <code>null</code>
*/
MutableMethodDeclaration addMethod(String name, Procedures.Procedure1<MutableMethodDeclaration> initializer);
示例14: addConstructor
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Adds a new constructor to this type declaration.
*
* @param initializer a call back for further initialization of the constructor
* @return the created constructor declaration
* @throws UnsupportedOperationException if the underlying type declaration is not capable of containing constructors.
* @exception IllegalArgumentException if the <code>initializer</code> is <code>null</code>
*/
MutableConstructorDeclaration addConstructor(Procedures.Procedure1<MutableConstructorDeclaration> initializer);
示例15: addAnnotationTypeElement
import org.eclipse.xtext.xbase.lib.Procedures; //导入方法依赖的package包/类
/**
* Adds a new annotation type element with the given name.
*
* @param name the name of the annotation type element to be added, must not be <code>null</code>
* @param initializer a callback for further initialization of the created annotation type element, must not be <code>null</code>
*
* @return the created annotation type element declaration
* @throws UnsupportedOperationException if the underlying type declaration is not capable of containing an annotation type element.
* @exception IllegalArgumentException if the <code>name</code> is not a valid java identifier or the <code>initializer</code> is <code>null</code>
*/
public MutableAnnotationTypeElementDeclaration addAnnotationTypeElement(String name,
Procedures.Procedure1<MutableAnnotationTypeElementDeclaration> initializer);