Tabnine Logo
TextConstant.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
net.bytebuddy.implementation.bytecode.constant.TextConstant
constructor

Best Java code snippets using net.bytebuddy.implementation.bytecode.constant.TextConstant.<init> (Showing top 20 results out of 315)

origin: redisson/redisson

/**
 * {@inheritDoc}
 */
public Resolved resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Assigner.Typing typing) {
  return new Resolved.Simple(new TextConstant(value), TypeDescription.STRING);
}
origin: redisson/redisson

@Override
protected StackManipulation methodName() {
  return new TextConstant(methodDescription.getInternalName());
}
origin: redisson/redisson

  /**
   * {@inheritDoc}
   */
  public StackManipulation make() {
    return new StackManipulation.Compound(
        TypeCreation.of(throwableType),
        Duplication.SINGLE,
        new TextConstant(message),
        MethodInvocation.invoke(targetConstructor));
  }
}
origin: redisson/redisson

Duplication.SINGLE,
ClassConstant.of(targetType),
new TextConstant(lambdaType.getInternalName()),
new TextConstant(lambdaMethodName),
new TextConstant(lambdaMethod.getDescriptor()),
IntegerConstant.forValue(targetMethod.getHandleType().getIdentifier()),
new TextConstant(targetMethod.getOwnerType().getInternalName()),
new TextConstant(targetMethod.getName()),
new TextConstant(targetMethod.getDescriptor()),
new TextConstant(specializedMethod.getDescriptor()),
ArrayFactory.forType(TypeDescription.Generic.OBJECT).withValues(lambdaArguments),
MethodInvocation.invoke(serializedLambda.getDeclaredMethods().filter(isConstructor()).getOnly()),
origin: redisson/redisson

/**
 * {@inheritDoc}
 */
public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {
  try {
    return new Compound(
        ClassConstant.of(fieldDescription.getDeclaringType()),
        new TextConstant(fieldDescription.getInternalName()),
        MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(Class.class.getMethod("getDeclaredField", String.class)))
    ).apply(methodVisitor, implementationContext);
  } catch (NoSuchMethodException exception) {
    throw new IllegalStateException("Cannot locate Class::getDeclaredField", exception);
  }
}
origin: redisson/redisson

stackManipulations.add(TypeCreation.of(TypeDescription.ForLoadedType.of(StringBuilder.class)));
stackManipulations.add(Duplication.SINGLE);
stackManipulations.add(new TextConstant(prefix));
stackManipulations.add(MethodInvocation.invoke(STRING_BUILDER_CONSTRUCTOR));
stackManipulations.add(new TextConstant(start));
stackManipulations.add(ValueConsumer.STRING);
boolean first = true;
    first = false;
  } else {
    stackManipulations.add(new TextConstant(separator));
    stackManipulations.add(ValueConsumer.STRING);
  stackManipulations.add(new TextConstant(fieldDescription.getName() + definer));
  stackManipulations.add(ValueConsumer.STRING);
  stackManipulations.add(MethodVariableAccess.loadThis());
  stackManipulations.add(ValueConsumer.of(fieldDescription.getType().asErasure()));
stackManipulations.add(new TextConstant(end));
stackManipulations.add(ValueConsumer.STRING);
stackManipulations.add(MethodInvocation.invoke(TO_STRING));
origin: redisson/redisson

  /**
   * {@inheritDoc}
   */
  public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {
    try {
      return new StackManipulation.Compound(
          TypeCreation.of(TypeDescription.ForLoadedType.of(ObjectInputStream.class)),
          Duplication.SINGLE,
          TypeCreation.of(TypeDescription.ForLoadedType.of(ByteArrayInputStream.class)),
          Duplication.SINGLE,
          new TextConstant(serialization),
          new TextConstant(CHARSET),
          MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(String.class.getMethod("getBytes", String.class))),
          MethodInvocation.invoke(new MethodDescription.ForLoadedConstructor(ByteArrayInputStream.class.getConstructor(byte[].class))),
          MethodInvocation.invoke(new MethodDescription.ForLoadedConstructor(ObjectInputStream.class.getConstructor(InputStream.class))),
          MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(ObjectInputStream.class.getMethod("readObject")))
      ).apply(methodVisitor, implementationContext);
    } catch (NoSuchMethodException exception) {
      throw new IllegalStateException("Could not locate Java API method", exception);
    }
  }
}
origin: redisson/redisson

  /**
   * {@inheritDoc}
   */
  public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod) {
    try {
      return new ByteCodeAppender.Simple(new StackManipulation.Compound(
          MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(ClassLoader.class.getMethod("getSystemClassLoader"))),
          new TextConstant(Nexus.class.getName()),
          MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(ClassLoader.class.getMethod("loadClass", String.class))),
          new TextConstant("initialize"),
          ArrayFactory.forType(TypeDescription.Generic.CLASS)
              .withValues(Arrays.asList(
                  ClassConstant.of(TypeDescription.CLASS),
                  ClassConstant.of(TypeDescription.ForLoadedType.of(int.class)))),
          MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(Class.class.getMethod("getMethod", String.class, Class[].class))),
          NullConstant.INSTANCE,
          ArrayFactory.forType(TypeDescription.Generic.OBJECT)
              .withValues(Arrays.asList(
                  ClassConstant.of(instrumentedMethod.getDeclaringType().asErasure()),
                  new StackManipulation.Compound(
                      IntegerConstant.forValue(identification),
                      MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(Integer.class.getMethod("valueOf", int.class)))))),
          MethodInvocation.invoke(new MethodDescription.ForLoadedMethod(Method.class.getMethod("invoke", Object.class, Object[].class))),
          Removal.SINGLE
      )).apply(methodVisitor, implementationContext, instrumentedMethod);
    } catch (NoSuchMethodException exception) {
      throw new IllegalStateException("Cannot locate method", exception);
    }
  }
}
origin: redisson/redisson

  return new ForStackManipulation(DoubleConstant.forValue((Double) value));
} else if (value instanceof String) {
  return new ForStackManipulation(new TextConstant((String) value));
} else {
  throw new IllegalArgumentException("Not a constant value: " + value);
origin: redisson/redisson

TypeCreation.of(instrumentedType),
Duplication.SINGLE,
new TextConstant(value),
IntegerConstant.forValue(ordinal++),
MethodInvocation.invoke(enumConstructor),
origin: redisson/redisson

  return new MethodDelegationBinder.ParameterBinding.Anonymous(methodConstant(annotation.loadSilent(), source.asDefined()));
} else if (parameterType.represents(String.class)) {
  return new MethodDelegationBinder.ParameterBinding.Anonymous(new TextConstant(source.toString()));
} else if (parameterType.represents(int.class)) {
  return new MethodDelegationBinder.ParameterBinding.Anonymous(IntegerConstant.forValue(source.getModifiers()));
origin: redisson/redisson

  typeDescription = TypeDescription.ForLoadedType.of(double.class);
} else if (value instanceof String) {
  stackManipulation = new TextConstant((String) value);
  typeDescription = TypeDescription.STRING;
} else {
origin: redisson/redisson

Class<?> type = fixedValue.getClass();
if (type == String.class) {
  return new ForPoolValue(new TextConstant((String) fixedValue), TypeDescription.STRING);
} else if (type == Class.class) {
  return new ForPoolValue(ClassConstant.of(TypeDescription.ForLoadedType.of((Class<?>) fixedValue)), TypeDescription.CLASS);
origin: redisson/redisson

Class<?> type = value.getClass();
if (type == String.class) {
  return setsValue(new TextConstant((String) value), String.class);
} else if (type == Class.class) {
  return setsValue(ClassConstant.of(TypeDescription.ForLoadedType.of((Class<?>) value)), Class.class);
origin: redisson/redisson

  return ForNullConstant.INSTANCE;
} else if (value instanceof String) {
  return new ForStackManipulation(new TextConstant((String) value), String.class);
} else if (value instanceof Boolean) {
  return new ForStackManipulation(IntegerConstant.forValue((Boolean) value), boolean.class);
origin: redisson/redisson

  suppliedType = TypeDescription.ForLoadedType.of(double.class);
} else if (value instanceof String) {
  stackManipulation = new TextConstant((String) value);
  suppliedType = TypeDescription.STRING;
} else if (value instanceof Class) {
origin: com.pragmaticobjects.oo.atom/atom-basis

  /**
   * Ctor.
   * @param string String
   */
  public SmtString(String string) {
    super(
      new TextConstant(string)
    );
  }
}
origin: com.pragmaticobjects.oo.atom/atom-basis

  @Override
  public final StackManipulation stackManipulation() {
    return new StackManipulation.Compound(
      new TextConstant(typeDescription.getName())
    );
  }
}
origin: com.pragmaticobjects.oo.atom/atom-basis

  @Override
  public final StackManipulation stackManipulation() {
    return new TextConstant(field.getName());
  }
}
origin: coi-gov-pl/spring-clean-architecture

 private StackManipulation eidCreation() {
  return new StackManipulation.Compound(
   TypeCreation.of(eidType),
   Duplication.SINGLE,
   new TextConstant(eid),
   MethodInvocation.invoke(eidConstructor));
 }
}
net.bytebuddy.implementation.bytecode.constantTextConstant<init>

Javadoc

Creates a new stack manipulation to load a String constant onto the operand stack.

Popular methods of TextConstant

    Popular in Java

    • Reading from database using SQL prepared statement
    • getResourceAsStream (ClassLoader)
    • startActivity (Activity)
    • findViewById (Activity)
    • ObjectMapper (com.fasterxml.jackson.databind)
      ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
    • Pointer (com.sun.jna)
      An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
    • FileOutputStream (java.io)
      An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
    • DateFormat (java.text)
      Formats or parses dates and times.This class provides factories for obtaining instances configured f
    • AtomicInteger (java.util.concurrent.atomic)
      An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
    • Logger (org.slf4j)
      The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
    • Top plugins for Android Studio
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now